Closed Bug 685900 Opened 13 years ago Closed 13 years ago

csshtmltree.refreshPanel should use a setTimeout loop to improve performance (cancel-able)

Categories

(DevTools :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 10

People

(Reporter: miker, Assigned: miker)

References

Details

(Whiteboard: [styleinspector][minotaur])

Attachments

(1 file, 5 obsolete files)

csshtmltree.refreshPanel should use a setTimeout loop to improve performance (cancel-able)
Whiteboard: [styleinspector]
Assignee: nobody → mratcliffe
Status: NEW → ASSIGNED
Attached patch setTimeout loop patch 1 (obsolete) (deleted) — Splinter Review
Done
Attachment #561164 - Flags: review?(mihai.sucan)
I would prefer a UI fix that doesn't show the number of unmatched rules. That's the part that takes a ton of time to compute in CssLogic. That would speed things up far more. Rob: what do you think?
Yes, but that is part of another bugfix ... Dave Camp asked for both.
He asked for this because it slows the breadcrumbs down a lot.
(In reply to Mihai Sucan [:msucan] from comment #2) > I would prefer a UI fix that doesn't show the number of unmatched rules. > That's the part that takes a ton of time to compute in CssLogic. That would > speed things up far more. > > Rob: what do you think? yeah, I don't know about this. I'd like to know more about why we need it (to speed up breadcrumbs?) and what we could do differently in the Style Inspector to make that not a problem.
(In reply to Rob Campbell [:rc] (robcee) from comment #5) > (In reply to Mihai Sucan [:msucan] from comment #2) > > I would prefer a UI fix that doesn't show the number of unmatched rules. > > That's the part that takes a ton of time to compute in CssLogic. That would > > speed things up far more. > > > > Rob: what do you think? > > yeah, I don't know about this. I'd like to know more about why we need it > (to speed up breadcrumbs?) and what we could do differently in the Style > Inspector to make that not a problem. There's work underway that will make these timeouts unneeded: 1. the style inspector UI update will remove the matched/unmatched selector counts, which are a major reason for the sluggishness (especially the unmatched count). 2. two new methods are going to be added to CssLogic: hasMatchedSelectors() and hasUnmatchedSelectors(). These will allow UI to change as needed, with a quick-bailout implementation that doesn't have to do all of the hard work done for retrieving counts or for displaying the list of selectors. I'm quite positive that with these two fixes (Mike's working on them), we'll be able to remove all timers. If performance will continue to be a problem, then CssHtmlTree remains to be the source of negative perf impact - the UI code.
Comment on attachment 561164 [details] [diff] [review] setTimeout loop patch 1 Review of attachment 561164 [details] [diff] [review]: ----------------------------------------------------------------- The UI work and the has[un]MatchedSelectors() stuff will help quite more with the perceived tool perf. My code comment is below. ::: browser/devtools/styleinspector/CssHtmlTree.jsm @@ +247,2 @@ > } > + this._panelRefreshTimeout = this.win.setTimeout(refreshView.bind(this), 0); I would prefer us to keep this.propertyViews as an object that maps property names to their PropertyView instance. If I am not mistaken, here you can loop through the object using a generator and a for..in loop.
Attachment #561164 - Flags: review?(mihai.sucan)
Comment on attachment 561164 [details] [diff] [review] setTimeout loop patch 1 Since we are going to keep this code (for now), I am giving the patch r+.
Attachment #561164 - Flags: review+
Whiteboard: [styleinspector] → [styleinspector][review+]
Attached patch setTimeout loop patch 2 (obsolete) (deleted) — Splinter Review
Fixed failing test
Attachment #561164 - Attachment is obsolete: true
Attached patch setTimeout loop patch 3 (obsolete) (deleted) — Splinter Review
Rebased
Attachment #566794 - Attachment is obsolete: true
Whiteboard: [styleinspector][review+] → [styleinspector][minotaur][review+]
Please update dependencies when they change. Also, please do not write each patch you work on on top of the previous work. This causes us to get into really long patch queues. Please keep dependencies strictly on a technical requirement level. For example this patch does not technically require bug 691736. (Anyhow, this suggestion should apply only for future patches, not for the existing patch queue. So, please don't apply my suggestion by decoupling the current Style Inspector patch queue :). Thank you!)
Depends on: 691736
Attached patch setTimeout loop patch 4 (obsolete) (deleted) — Splinter Review
Rebased
Attachment #566850 - Attachment is obsolete: true
Attachment #567403 - Flags: review?
Attached patch setTimeout loop patch 5 (obsolete) (deleted) — Splinter Review
Rebased
Attachment #567403 - Attachment is obsolete: true
No longer blocks: 685902
Removed dependencies as part of reordering patch queue
Attachment #567728 - Attachment is obsolete: true
Whiteboard: [styleinspector][minotaur][review+] → [styleinspector][minotaur][land-in-fx-team]
Whiteboard: [styleinspector][minotaur][land-in-fx-team] → [styleinspector][minotaur][fixed-in-fx-team]
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [styleinspector][minotaur][fixed-in-fx-team] → [styleinspector][minotaur]
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: