Closed Bug 689968 Opened 13 years ago Closed 13 years ago

CssLogic is slow at skipping UA rules for the unmatched selectors view

Categories

(DevTools :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 10

People

(Reporter: msucan, Assigned: msucan)

Details

(Whiteboard: [styleinspector][fixed-in-fx-team])

Attachments

(1 file)

CssLogic skips on a selector-by-selector basis those rules that come from UA style sheets, when building the array of unmatched selectors.

(note that a sheet has multiple rules, and each rule has multiple selectors!)

We need to skip UA sheets entirely from being processed when building the array of unmatched selectors. This will improve performance in all of the Style Inspector use cases, irrespective of the "Show only user styles" checkbox state.
Attached patch proposed fixSplinter Review
This patch changes the location of where the system rules are skipped.

It seems that system rules have been skipped inside the CssPropertyInfo code path. It should be quite faster to skip the system style sheets entirely in the CssLogic code path, so they never get processed.

(I don't know when the change was made for systemRules to be skipped in the unmatched selectors view...)

All tests pass on my system.
Assignee: nobody → mihai.sucan
Status: NEW → ASSIGNED
Attachment #563092 - Flags: review?(rcampbell)
Comment on attachment 563092 [details] [diff] [review]
proposed fix

yes!
Attachment #563092 - Flags: review?(rcampbell) → review+
Thank you Rob!
Whiteboard: [styleinspector] → [styleinspector][land-in-fx-team]
https://hg.mozilla.org/integration/fx-team/rev/8bcf17f1aaed
Whiteboard: [styleinspector][land-in-fx-team] → [styleinspector][fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/8bcf17f1aaed
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 10
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: