RESOLVED FIXED Bug 31432
Web Inspector: profile timeline panel, fix obvious problems.
https://bugs.webkit.org/show_bug.cgi?id=31432
Summary Web Inspector: profile timeline panel, fix obvious problems.
Pavel Feldman
Reported 2009-11-12 13:56:53 PST
Start timeline for cnn.com load. Stop it in 30 seconds. Moving / resizing window is slow.
Attachments
[PATCH] fixes. (9.20 KB, patch)
2009-11-12 14:00 PST, Pavel Feldman
no flags
[PATCH] Updating removeStyleClass as well. (10.26 KB, patch)
2009-11-12 14:47 PST, Pavel Feldman
timothy: review+
Pavel Feldman
Comment 1 2009-11-12 14:00:18 PST
Created attachment 43096 [details] [PATCH] fixes. There are few lines removed in AbstractTimelinePanel. I don't understand why they were there. Any clues?
Joseph Pecoraro
Comment 2 2009-11-12 14:30:51 PST
> + var index = this.className.indexOf(className); > + if (index === -1) > + return false; > + var toTest = " " + this.className + " "; > + return toTest.indexOf(" " + className + " ", index) !== -1; Why the changes to hasStyleClass? I assume that using indexOf is faster then checking a regular expression. If that is the case then this looks like a good idea. In your experience is the string concatenation that expensive that its worth the early check?
Pavel Feldman
Comment 3 2009-11-12 14:47:00 PST
(In reply to comment #2) > > + var index = this.className.indexOf(className); > > + if (index === -1) > > + return false; > > + var toTest = " " + this.className + " "; > > + return toTest.indexOf(" " + className + " ", index) !== -1; > > Why the changes to hasStyleClass? I assume that using indexOf is faster then > checking a regular expression. If that is the case then this looks like a good > idea. In your experience is the string concatenation that expensive that its > worth the early check? As I understand it creates two more objects in VM heap. Given that GC is not (yet?) generational, it'll make subsequent gc more expensive.
Pavel Feldman
Comment 4 2009-11-12 14:47:42 PST
Created attachment 43102 [details] [PATCH] Updating removeStyleClass as well.
Pavel Feldman
Comment 5 2009-11-12 15:07:38 PST
Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebCore/ChangeLog M WebCore/inspector/front-end/AbstractTimelinePanel.js M WebCore/inspector/front-end/TimelinePanel.js M WebCore/inspector/front-end/utilities.js Committed r50909
Note You need to log in before you can comment on or make changes to this bug.