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)
DevTools
General
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 10
People
(Reporter: miker, Assigned: miker)
References
Details
(Whiteboard: [styleinspector][minotaur])
Attachments
(1 file, 5 obsolete files)
(deleted),
patch
|
Details | Diff | Splinter Review |
csshtmltree.refreshPanel should use a setTimeout loop to improve performance (cancel-able)
Assignee | ||
Updated•13 years ago
|
Whiteboard: [styleinspector]
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → mratcliffe
Status: NEW → ASSIGNED
Comment 2•13 years ago
|
||
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?
Assignee | ||
Comment 3•13 years ago
|
||
Yes, but that is part of another bugfix ... Dave Camp asked for both.
Assignee | ||
Comment 4•13 years ago
|
||
He asked for this because it slows the breadcrumbs down a lot.
Comment 5•13 years ago
|
||
(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.
Comment 6•13 years ago
|
||
(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 7•13 years ago
|
||
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 8•13 years ago
|
||
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+
Assignee | ||
Updated•13 years ago
|
Whiteboard: [styleinspector] → [styleinspector][review+]
Assignee | ||
Comment 9•13 years ago
|
||
Fixed failing test
Attachment #561164 -
Attachment is obsolete: true
Assignee | ||
Updated•13 years ago
|
Whiteboard: [styleinspector][review+] → [styleinspector][minotaur][review+]
Comment 11•13 years ago
|
||
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
Assignee | ||
Comment 12•13 years ago
|
||
Rebased
Attachment #566850 -
Attachment is obsolete: true
Attachment #567403 -
Flags: review?
Assignee | ||
Updated•13 years ago
|
Attachment #567403 -
Flags: review?
Assignee | ||
Comment 14•13 years ago
|
||
Removed dependencies as part of reordering patch queue
Attachment #567728 -
Attachment is obsolete: true
Assignee | ||
Updated•13 years ago
|
Whiteboard: [styleinspector][minotaur][review+] → [styleinspector][minotaur][land-in-fx-team]
Comment 15•13 years ago
|
||
Whiteboard: [styleinspector][minotaur][land-in-fx-team] → [styleinspector][minotaur][fixed-in-fx-team]
Comment 16•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [styleinspector][minotaur][fixed-in-fx-team] → [styleinspector][minotaur]
Target Milestone: --- → Firefox 10
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•