Start timeline for cnn.com load. Stop it in 30 seconds. Moving / resizing window is slow.
Created attachment 43096 [details] [PATCH] fixes. There are few lines removed in AbstractTimelinePanel. I don't understand why they were there. Any clues?
> + 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?
(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.
Created attachment 43102 [details] [PATCH] Updating removeStyleClass as well.
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