Closed Bug 344452 Opened 19 years ago Closed 17 years ago

Don't add universal style rules for calendars and categories

Categories

(Calendar :: Internal Components, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jminta, Unassigned)

Details

(Keywords: perf)

Attachments

(1 file)

We know, a priori, which kinds of elements are going to get the calendar and category attributes appended to them. We should therefore create more specific style rules to correspond to them. dbaron just gave a layout talk where he said this would help make things much easier on the layout engine, and thus improve performance.
The bugspam monkeys have struck again. They are currently chewing on default assignees for Calendar. Be afraid for your sanity!
Assignee: base → nobody
The main bulk of this patch is to unify the dynamic style rule creation code for Sunbird and Lightning. This means we don't have to fix bugs in it twice. For the most part the code is cut+paste from Sunbird, since that code also handled categories. For Sunbird, this code introduces caching of the style sheet. Lightning already did this. For both apps, we now append rules to calendar-view-bindings, for a performance win, since there are fewer rules to check for equality. Together, these performance wins total about 70ms of startup time for Sunbird. For lightning, the performance wins are all in layout, where it's more difficult to measure. (Note that Sunbird also has the layout perf wins, but again they're tough to quantify from a js context.)
Assignee: nobody → jminta
Status: NEW → ASSIGNED
Attachment #230634 - Flags: first-review?(dmose)
Comment on attachment 230634 [details] [diff] [review] unify color code, use .calendar-item The code to actually set the rules is rather difficult to read. It needs to be refactored to be easier to follow. Please file a followup bug to do this, probably using a single if/else block that sets params that can then be used nicely. r=dmose
Attachment #230634 - Flags: first-review?(dmose) → first-review+
Whiteboard: [needs checkin jminta]
Whiteboard: [needs checkin jminta] → [needs checkin jminta] [needs spinoff?]
This patch is really really rotten. The spin-off bit already landed, so we just need an updated patch here to add the class to the items and make our rules respect that class.
Whiteboard: [needs checkin jminta] [needs spinoff?] → [needs updated patch]
Re-assigning my bugs to nobody@mozilla.org due to recent developments.
Assignee: jminta → nobody
Status: ASSIGNED → NEW
This patch was either checked in or fixed along the way. The code is at least already in the tree. -> FIXED
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Whiteboard: [needs updated patch]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: