Closed Bug 955293 Opened 11 years ago Closed 11 years ago

Bubbles shouldn't call getComputedStyle for each message

Categories

(Instantbird Graveyard :: Conversation, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: florian, Assigned: florian)

Details

Attachments

(1 file)

*** Original post on bio 1860 at 2012-12-23 15:07:00 UTC ***

*** Due to BzAPI limitations, the initial description is in comment 1 ***
Attached patch Patch v1Splinter Review
*** Original post on bio 1860 as attmnt 2179 at 2012-12-23 15:07:00 UTC ***

When profiling the display of a large conversation with Bubbles, setColors takes 55% of the total time, and this is because it causes a synchronous reflow for each inserted message by calling getComputedStyle on the new message.

The attached patch caches the result of the first getComputedStyle call, it makes the average total display time for a 11k tweets conversation drop from 68s to 44s on my machine. (setColors is now only 3.4% of the total time.)
Attachment #8353941 - Flags: review?(clokep)
Comment on attachment 8353941 [details] [diff] [review]
Patch v1

*** Original change on bio 1860 attmnt 2179 at 2012-12-23 15:32:10 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8353941 - Flags: review?(clokep) → review+
*** Original post on bio 1860 at 2012-12-25 04:47:50 UTC ***

Checked in as http://hg.instantbird.org/instantbird/rev/bf15064cf956
Assignee: nobody → florian
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: