WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
82681
NodeRareData::m_treeScope should be lazily retrieved
https://bugs.webkit.org/show_bug.cgi?id=82681
Summary
NodeRareData::m_treeScope should be lazily retrieved
Hajime Morrita
Reported
2012-03-29 17:28:30 PDT
Currently we set it when a node is inserted into a tree. But it lets all nodes behind shadow to have NodeRareData. That means it no longer "rare". In reality, NodeRareData::m_treeScope is a kind of a cash. So we don't maintain it eagerly. It can be lazily retrieved. This is an alternative of
Bug 59816
which aimed to make TreeScope management saner and performant.
Attachments
WIP
(25.64 KB, patch)
2012-03-30 00:27 PDT
,
Hajime Morrita
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Hajime Morrita
Comment 1
2012-03-30 00:27:39 PDT
Created
attachment 134738
[details]
WIP
Elliott Sprehn
Comment 2
2012-12-06 09:50:35 PST
Comment on
attachment 134738
[details]
WIP View in context:
https://bugs.webkit.org/attachment.cgi?id=134738&action=review
> Source/WebCore/dom/Node.cpp:446 > +TreeScope* Node::treeScope(TreeScopeStoreCacheType scoreCache) const
If we took this approach I think you'd need some kind of DirtyTreeScope bit field in node otherwise you're going to cause rare data on every node we call treeScope() on, ex. during event dispatch, and you're also going to introduce this tree walk for treeScope() into all existing pages even ones that don't use Shadow DOM so treeScope gets much slower.
Hajime Morrita
Comment 3
2012-12-06 21:44:56 PST
(In reply to
comment #2
)
> If we took this approach I think you'd need some kind of DirtyTreeScope bit field in node otherwise you're going to cause rare data on every node we call treeScope() on, ex. during event dispatch, and you're also going to introduce this tree walk for treeScope() into all existing pages even ones that don't use Shadow DOM so treeScope gets much slower.
Yes, this approach looks inferior than replacing document pointer. We need to inspect each treeScope() call to decide which (slow-clean or fast-caching) we should use. That isn't what we want. This bug was just a result of exploration for attacking slow-treeScope problem.
Dominic Cooney
Comment 4
2013-01-10 06:09:14 PST
Since
r138735
m_treeScope is in Node. So I believe this is fixed.
Ryosuke Niwa
Comment 5
2013-01-10 09:09:44 PST
It's probably better to close this with WONTFIX since this bug no longer applies to ToT WebKit.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug