WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
135427
Web Inspector: MessageDispatcher should not synchronously dispatch all backend messages
https://bugs.webkit.org/show_bug.cgi?id=135427
Summary
Web Inspector: MessageDispatcher should not synchronously dispatch all backen...
Brian Burg
Reported
2014-07-30 14:08:36 PDT
patch coming
Attachments
Patch
(6.70 KB, patch)
2014-07-30 14:25 PDT
,
Brian Burg
timothy
: review+
timothy
: commit-queue-
Details
Formatted Diff
Diff
example output 1
(206.15 KB, text/plain)
2014-07-30 14:32 PDT
,
Brian Burg
no flags
Details
example output 2
(339.40 KB, text/plain)
2014-07-30 14:33 PDT
,
Brian Burg
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Brian Burg
Comment 1
2014-07-30 14:25:03 PDT
Created
attachment 235761
[details]
Patch
Joseph Pecoraro
Comment 2
2014-07-30 14:30:11 PDT
Comment on
attachment 235761
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=235761&action=review
> Source/WebInspectorUI/UserInterface/Protocol/MessageDispatcher.js:50 > + this._dispatchTimeout = setTimeout(this.dispatchNextQueuedMessageFromBackend.bind(this), 0);
We should avoid this.dispatchNextQueuedMessageFromBackend.bind every time this happens and have a pre-bound version of this that we can call. Or eliminate all uses of "this." and convert to "WebInspector." and we won't need a bound function.
Brian Burg
Comment 3
2014-07-30 14:32:35 PDT
Created
attachment 235763
[details]
example output 1
Brian Burg
Comment 4
2014-07-30 14:33:47 PDT
Created
attachment 235764
[details]
example output 2 the first attachment shows logspew when reloading cnn.com as the inspector is viewing resources. the second is the same reload while looking at timeline overviews.
Timothy Hatcher
Comment 5
2014-07-30 17:16:58 PDT
Comment on
attachment 235761
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=235761&action=review
> Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js:176 > + var processingDuration = Date.now() - processingStartTime;
performance.now()! You wil get better numbers.
> Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js:223 > + var processingDuration = Date.now() - processingStartTime;
Ditto.
> Source/WebInspectorUI/UserInterface/Protocol/MessageDispatcher.js:32 > + var startTime = Date.now();
performance.now()
> Source/WebInspectorUI/UserInterface/Protocol/MessageDispatcher.js:36 > + var i; > + for (i = 0; i < this.messagesToDispatch.length; ++i) {
I would put var i = 0; on the first line and leave the for loop initialize statement empty. Saves on var changes and will make the JIT happier.
> Source/WebInspectorUI/UserInterface/Protocol/MessageDispatcher.js:39 > + if (Date.now() - startTime > timeLimitPerRunLoop)
performance.now()
Brian Burg
Comment 6
2014-07-31 12:45:56 PDT
Comment on
attachment 235761
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=235761&action=review
>> Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js:176 >> + var processingDuration = Date.now() - processingStartTime; > > performance.now()! You wil get better numbers.
Not enabled for Mac and Win ports, apparently. Tracked here: <
https://bugs.webkit.org/show_bug.cgi?id=42434
> and here: <
https://bugs.webkit.org/show_bug.cgi?id=135467
>
>> Source/WebInspectorUI/UserInterface/Protocol/MessageDispatcher.js:36 >> + for (i = 0; i < this.messagesToDispatch.length; ++i) { > > I would put var i = 0; on the first line and leave the for loop initialize statement empty. Saves on var changes and will make the JIT happier.
ok
>> Source/WebInspectorUI/UserInterface/Protocol/MessageDispatcher.js:50 >> + this._dispatchTimeout = setTimeout(this.dispatchNextQueuedMessageFromBackend.bind(this), 0); > > We should avoid this.dispatchNextQueuedMessageFromBackend.bind every time this happens and have a pre-bound version of this that we can call. Or eliminate all uses of "this." and convert to "WebInspector." and we won't need a bound function.
ok
Radar WebKit Bug Importer
Comment 7
2014-07-31 12:47:08 PDT
<
rdar://problem/17874168
>
Brian Burg
Comment 8
2014-07-31 12:47:56 PDT
Committed
r171881
: <
http://trac.webkit.org/changeset/171881
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug