Closed
Bug 934946
Opened 12 years ago
Closed 12 years ago
Add most-recently-used-contentlists cache
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla28
People
(Reporter: smaug, Assigned: smaug)
References
Details
Attachments
(3 files)
|
5.28 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
|
6.08 KB,
patch
|
Details | Diff | Splinter Review | |
|
5.38 KB,
patch
|
Details | Diff | Splinter Review |
Looks like adding a simple most-recently-used-contentlists cache helps
about 20% with Bug 916851, and it also speeds up dromaeo dom-query.
Somewhat dirty approach. In theory a hashtable should just do its job fast enough, though
this kind of cache let's one to inline more I guess.
I tried few sizes and 31 seemed to give quite stable results without being too huge.
https://tbpl.mozilla.org/?tree=Try&rev=be36926b326b
I tried adding also 3rd level of cache, by caching the most recently used list.
That helped even more with dromaeo dom-query, but was worse with Bug 916851 -
as expected.
Attachment #827338 -
Flags: review?(bzbarsky)
Comment 1•12 years ago
|
||
So I tried this, and it's faster than what we have now, but not as fast as having 31-element cache. In fact, it about splits the difference between that 31-element cache and now.
Comment 2•12 years ago
|
||
Comment on attachment 827338 [details] [diff] [review]
patch
Could we wrap up the cache in a struct with at least a method to compute the right index?
>+ uint32_t mHash;
const uint32_t.
r=me with that, since I have no better ideas. :(
Attachment #827338 -
Flags: review?(bzbarsky) → review+
| Assignee | ||
Comment 3•12 years ago
|
||
Not sure about the struct, but a helper method would be nice indeed.
| Assignee | ||
Comment 4•12 years ago
|
||
| Assignee | ||
Comment 5•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Updated•7 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•