Bug 74269

Summary: Implement a cache for CSSStyleRule::selectorText()
Product: WebKit Reporter: Alexander Pavlov (apavlov) <apavlov>
Component: CSSAssignee: Alexander Pavlov (apavlov) <apavlov>
Status: RESOLVED FIXED    
Severity: Normal CC: macpherson, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 74004    
Attachments:
Description Flags
Patch
none
[PATCH] ChangeLog entry augmented kling: review+, kling: commit-queue-

Alexander Pavlov (apavlov)
Reported 2011-12-12 00:56:58 PST
Patch to follow.
Attachments
Patch (4.78 KB, patch)
2011-12-12 02:20 PST, Alexander Pavlov (apavlov)
no flags
[PATCH] ChangeLog entry augmented (5.36 KB, patch)
2011-12-12 07:09 PST, Alexander Pavlov (apavlov)
kling: review+
kling: commit-queue-
Alexander Pavlov (apavlov)
Comment 1 2011-12-12 02:20:42 PST
Alexander Pavlov (apavlov)
Comment 2 2011-12-12 07:09:44 PST
Created attachment 118782 [details] [PATCH] ChangeLog entry augmented
Andreas Kling
Comment 3 2011-12-12 07:21:07 PST
Comment on attachment 118782 [details] [PATCH] ChangeLog entry augmented View in context: https://bugs.webkit.org/attachment.cgi?id=118782&action=review r=me, but please inline cleanup() before landing. > Source/WebCore/css/CSSStyleRule.cpp:51 > + cleanup(); I'd rather we inline cleanup() here to avoid introducing a perf regression (however tiny) in document teardown. > Source/WebCore/css/CSSStyleRule.cpp:126 > + if (m_hasCachedSelectorText) { > + ASSERT(selectorTextCache().contains(this)); > + selectorTextCache().remove(this); > + m_hasCachedSelectorText = false; > + } > + > if (this->selectorText() == oldSelectorText) > return; We could factor this differently to reduce hash map churn (the remove() is always followed by a set().)
Alexander Pavlov (apavlov)
Comment 4 2011-12-12 07:48:00 PST
Note You need to log in before you can comment on or make changes to this bug.