Closed
Bug 839325
Opened 11 years ago
Closed 11 years ago
Cleanup in aisle GeckoViewsFactory
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 21
People
(Reporter: kats, Assigned: kats)
Details
Attachments
(1 file)
12.30 KB,
patch
|
sriram
:
review+
|
Details | Diff | Splinter Review |
The table of things is really ugly, and the string compares probably aren't cheap when we're doing an average of 17.5 of them for every view. Try run at https://tbpl.mozilla.org/?tree=Try&rev=13289444c45d for talos
Attachment #711611 -
Flags: review?(sriram)
Comment 1•11 years ago
|
||
Comment on attachment 711611 [details] [diff] [review] Patch Review of attachment 711611 [details] [diff] [review]: ----------------------------------------------------------------- This looks good to me. How 17.5? Why size /load-factor ?
Attachment #711611 -
Flags: review?(sriram) → review+
Assignee | ||
Comment 2•11 years ago
|
||
(In reply to Sriram Ramasubramanian [:sriram] from comment #1) > How 17.5? Sorry, that should be 18. It'll do between 1 and 35 string compares. Since they're not ordered by frequency, assuming each one is hit once, that averages out to 18 string compares per call. > Why size /load-factor ? Because if the number of elements put into the hashtable is more than (capacity * load-factor) then the hashtable does an expensive resize operation to make itself bigger. If we know how many elements are going into it ahead of time, it's best to just size the hashtable correctly the first time. https://hg.mozilla.org/integration/mozilla-inbound/rev/ffd1feb1a4c0
Comment 3•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/ffd1feb1a4c0
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 21
Updated•3 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•