[webkit-reviews] review granted: [Bug 87942] [Performance] Optimize querySelector() by caching SelectorQuery objects : [Attachment 145447] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Jun 2 10:31:16 PDT 2012
Antti Koivisto <koivisto at iki.fi> has granted Kentaro Hara
<haraken at chromium.org>'s request for review:
Bug 87942: [Performance] Optimize querySelector() by caching SelectorQuery
objects
https://bugs.webkit.org/show_bug.cgi?id=87942
Attachment 145447: Patch
https://bugs.webkit.org/attachment.cgi?id=145447&action=review
------- Additional Comments from Antti Koivisto <koivisto at iki.fi>
View in context: https://bugs.webkit.org/attachment.cgi?id=145447&action=review
nice, r=me
> Source/WebCore/dom/SelectorQuery.h:80
> +class SelectorQueryCache {
> +public:
This should have
WTF_MAKE_NONCOPYABLE(SelectorQueryCache); WTF_MAKE_FAST_ALLOCATED;
> Source/WebCore/dom/SelectorQuery.h:89
> + class Entry {
> + public:
WTF_MAKE_NONCOPYABLE(Entry); WTF_MAKE_FAST_ALLOCATED;
> Source/WebCore/dom/SelectorQuery.h:98
> + // m_querySelectorList must not be destructed before m_selectorQuery
is destructed.
> + CSSSelectorList m_querySelectorList;
> + SelectorQuery m_selectorQuery;
If the CSSSelectorList was moved to SelectorQuery then you might be able to get
rid of the Entry type entirely and just have OwnPtr<SelectorQuery> as the map
value. This doesn't need to be done in this patch though.
More information about the webkit-reviews
mailing list