Bug 31432 - Web Inspector: profile timeline panel, fix obvious problems.
Summary: Web Inspector: profile timeline panel, fix obvious problems.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Pavel Feldman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-12 13:56 PST by Pavel Feldman
Modified: 2009-11-12 15:07 PST (History)
4 users (show)

See Also:


Attachments
[PATCH] fixes. (9.20 KB, patch)
2009-11-12 14:00 PST, Pavel Feldman
no flags Details | Formatted Diff | Diff
[PATCH] Updating removeStyleClass as well. (10.26 KB, patch)
2009-11-12 14:47 PST, Pavel Feldman
timothy: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Feldman 2009-11-12 13:56:53 PST
Start timeline for cnn.com load. Stop it in 30 seconds. Moving / resizing window is slow.
Comment 1 Pavel Feldman 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?
Comment 2 Joseph Pecoraro 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?
Comment 3 Pavel Feldman 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.
Comment 4 Pavel Feldman 2009-11-12 14:47:42 PST
Created attachment 43102 [details]
[PATCH] Updating removeStyleClass as well.
Comment 5 Pavel Feldman 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