RESOLVED FIXED 89036
Shrink NodeListsNodeData
https://bugs.webkit.org/show_bug.cgi?id=89036
Summary Shrink NodeListsNodeData
Ryosuke Niwa
Reported 2012-06-13 14:02:09 PDT
It's wasteful for NodeListsNodeData to have HashMap, HashSet, of all node list types. This will become a serious problem when we try to make HTMLCollection behave more like DynamicNodeList.
Attachments
work in progress (27.55 KB, patch)
2012-06-13 14:03 PDT, Ryosuke Niwa
no flags
work in progress 2 (54.15 KB, patch)
2012-06-20 13:40 PDT, Ryosuke Niwa
no flags
Patch (41.69 KB, patch)
2012-06-20 20:31 PDT, Ryosuke Niwa
kling: review+
Ryosuke Niwa
Comment 1 2012-06-13 14:03:21 PDT
Created attachment 147405 [details] work in progress
Ryosuke Niwa
Comment 2 2012-06-13 14:05:08 PDT
Another thing I want to do this in patch is to move more code from Node/NodeListsNodeData to subclasses of DynamicNodeList so that we don't have modify so much code to add a new type of DynamicNodeList.
Ryosuke Niwa
Comment 3 2012-06-20 13:40:13 PDT
Created attachment 148646 [details] work in progress 2 Here, I've replaced HashMaps by a Vector of DynamicNodeListCache objects. But I think this incurs too much overhead and is somewhat over-engineered. I'll take some goodies that came out of this patch and fix in separate bugs.
Ryosuke Niwa
Comment 4 2012-06-20 20:31:14 PDT
Ryosuke Niwa
Comment 5 2012-06-20 20:34:14 PDT
Comment on attachment 148721 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=148721&action=review > Source/WebCore/dom/NodeRareData.h:57 > + template<typename T> > + PassRefPtr<T> addCacheWithAtomicName(Node* node, DynamicNodeList::NodeListType listType, const AtomicString& name) Should we use some sort of traits to avoid manually passing list type here?
Andreas Kling
Comment 6 2012-06-21 16:22:19 PDT
Comment on attachment 148721 [details] Patch r=me
Ryosuke Niwa
Comment 7 2012-06-21 16:38:01 PDT
Note You need to log in before you can comment on or make changes to this bug.