Closed
Bug 585111
Opened 14 years ago
Closed 14 years ago
two performance improvements to TBPL's HTML generation
Categories
(Tree Management Graveyard :: TBPL, defect)
Tree Management Graveyard
TBPL
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: dbaron, Assigned: dbaron)
References
Details
(Keywords: perf)
Attachments
(2 files)
2.57 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
4.17 KB,
patch
|
mstange
:
review+
|
Details | Diff | Splinter Review |
I started poking at what was slow about TBPL, and found two relatively straightforward improvements.
Assignee | ||
Comment 1•14 years ago
|
||
This avoids doing += on ul.innerHTML. Doing innerHTML += ... means that we have to run the innerHTML getter, and then run the setter. This saves serialization and reparsing. This drops _writePushesListHTML from about 250ms to 180ms on current mozilla-central on my machine.
Attachment #463596 -
Flags: review?(mstange)
Assignee | ||
Comment 2•14 years ago
|
||
Most of the time in _buildPushesList, however, is installing (and, for refreshes, uninstalling) the click handlers on the machineResult links. This switches them to use event handler attributes. It's a little out-of-style, but the win is huge. This speeds up _buildPushesList from 425ms to 215ms for the initial load of current mozilla-central, and even more for the reloads (because of the uninstall). After this patch, _writePushesListHTML dominates the performance of _buildPushesList.
Attachment #463598 -
Flags: review?(mstange)
Comment 3•14 years ago
|
||
Comment on attachment 463596 [details] [diff] [review] set innerHTML only once Stepping on mstange's toes here...
Attachment #463596 -
Flags: review?(mstange) → review+
Comment 4•14 years ago
|
||
Comment on attachment 463598 [details] [diff] [review] use event handler attributes for machineResult links This looks safe to me, but I'll let Markus take a look at it as well. BTW, have you filed core bug to speed this up?
Updated•14 years ago
|
Attachment #463598 -
Flags: review?(mstange) → review+
Assignee | ||
Comment 5•14 years ago
|
||
http://hg.mozilla.org/users/mstange_themasta.com/tinderboxpushlog/rev/bff03fb25158 http://hg.mozilla.org/users/mstange_themasta.com/tinderboxpushlog/rev/330ad3458ff3 sayrer suggested jQuery bind is slow; I'm not sure what core bug I would file.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 6•14 years ago
|
||
And added a whitespace fix since I forgot the bug number: http://hg.mozilla.org/users/mstange_themasta.com/tinderboxpushlog/rev/9ba0f98dd820
Comment 7•14 years ago
|
||
deployed
Updated•10 years ago
|
Product: Webtools → Tree Management
Updated•9 years ago
|
Product: Tree Management → Tree Management Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•