Bug 54010 - Web Inspector: script formatter should not create a worker for each script.
Summary: Web Inspector: script formatter should not create a worker for each script.
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 Podivilov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-08 09:05 PST by Pavel Podivilov
Modified: 2011-02-09 02:12 PST (History)
10 users (show)

See Also:


Attachments
Patch. (2.55 KB, patch)
2011-02-08 09:06 PST, Pavel Podivilov
yurys: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Podivilov 2011-02-08 09:05:08 PST
Reusing a worker results in a much better performance when formatting multiple scripts inlined in html.
Comment 1 Pavel Podivilov 2011-02-08 09:06:01 PST
Created attachment 81644 [details]
Patch.
Comment 2 Yury Semikhatsky 2011-02-08 23:46:07 PST
Comment on attachment 81644 [details]
Patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=81644&action=review

> Source/WebCore/inspector/front-end/ScriptFormatter.js:133
> +        this._lastTask = task;

I'd rather use and array with its push/shift methods
Comment 3 Pavel Podivilov 2011-02-09 02:12:34 PST
Committed r78034: <http://trac.webkit.org/changeset/78034>