WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
95731
Web Inspector: Timeline: cache "filteredRecords" for better scrolling performance.
https://bugs.webkit.org/show_bug.cgi?id=95731
Summary
Web Inspector: Timeline: cache "filteredRecords" for better scrolling perform...
eustas.bug
Reported
2012-09-04 04:14:16 PDT
Now scrolling is sluggish on large datasets. Performance degrades, because each refresh causes DFS on all recorded items. Solution: caching/invalidation of DFS (filtering) results.
Attachments
Patch
(6.23 KB, patch)
2012-09-04 04:19 PDT
,
eustas.bug
no flags
Details
Formatted Diff
Diff
Patch
(6.69 KB, patch)
2012-09-05 01:18 PDT
,
eustas.bug
no flags
Details
Formatted Diff
Diff
Patch
(6.12 KB, patch)
2012-09-06 05:12 PDT
,
eustas.bug
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
eustas.bug
Comment 1
2012-09-04 04:19:58 PDT
Created
attachment 162005
[details]
Patch
Andrey Kosyakov
Comment 2
2012-09-04 04:37:17 PDT
Comment on
attachment 162005
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=162005&action=review
> Source/WebCore/inspector/front-end/TimelinePanel.js:677 > + _scheduleRefresh: function(preserveBoundaries, invalidateFilteredRecords) > { > + if (invalidateFilteredRecords) > + this._presentationModel.invalidateFilteredRecords();
Rather than passing additional bool to scheduleRefresh, can we instead perform invalidation on the call site? You may want to extract this to a method like invalidateVisibleRecordsAndRefresh()
eustas.bug
Comment 3
2012-09-05 01:18:39 PDT
Created
attachment 162183
[details]
Patch
Andrey Kosyakov
Comment 4
2012-09-05 08:28:11 PDT
Comment on
attachment 162183
[details]
Patch LGTM
Yury Semikhatsky
Comment 5
2012-09-06 01:19:07 PDT
Comment on
attachment 162183
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=162183&action=review
> Source/WebCore/inspector/front-end/TimelinePanel.js:638 > + this._automaticallySizeWindow = this._automaticallySizeWindow || !preserveAutomaticallySizeWindow;
Could you explain this part?
Andrey Kosyakov
Comment 6
2012-09-06 01:20:56 PDT
Comment on
attachment 162183
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=162183&action=review
>> Source/WebCore/inspector/front-end/TimelinePanel.js:638 >> + this._automaticallySizeWindow = this._automaticallySizeWindow || !preserveAutomaticallySizeWindow; > > Could you explain this part?
@eustas: can we instead unconditionally set this to false in repopulate? If we needed automatic resize, this should have happened by now and we would just need to preserve the window?
Pavel Feldman
Comment 7
2012-09-06 02:01:33 PDT
As with any optimization that makes the code more complex, please provide some metrics for most common scenarios that prove speed ups. Why do we dfs at the first place? Should we bisect records in case of no glueing? Can we bisect with gliding? Caching has no real benefit, it will only eat memory here imo.
eustas.bug
Comment 8
2012-09-06 02:09:10 PDT
(In reply to
comment #7
)
> As with any optimization that makes the code more complex, please provide some metrics for most common scenarios that prove speed ups. Why do we dfs at the first place? Should we bisect records in case of no glueing? Can we bisect with gliding? Caching has no real benefit, it will only eat memory here imo.
In this case caching provides almost 10x performance boost (90ms -> 9ms on large dataset). DFS is used, because visibility of child records is independent of visibility of parent records. Of course "filteredRecords" could/would/should be optimized, but this patch is the first step. With this patch scrolling becomes much-much smoother.
Pavel Feldman
Comment 9
2012-09-06 02:16:18 PDT
OK, patch concept lgtm. But in reality instead of scrolling users will adjust window. We should bisect time instead of linear searching. That would fix all scenarios.
Andrey Kosyakov
Comment 10
2012-09-06 02:40:30 PDT
(In reply to
comment #9
)
> OK, patch concept lgtm. But in reality instead of scrolling users will adjust window. We should bisect time instead of linear searching. That would fix all scenarios.
Why I agree we should bisect for window selection, it doesn't cover all the scenarios -- we also have filtering on type and (coming up) search. I don't think caching really "eats memory" here -- re-allocating the same array each time we scroll/resize actually does more harm, as we thrash the GC.
eustas.bug
Comment 11
2012-09-06 05:12:45 PDT
Created
attachment 162479
[details]
Patch
Andrey Kosyakov
Comment 12
2012-09-06 05:15:40 PDT
Comment on
attachment 162479
[details]
Patch LGTM
WebKit Review Bot
Comment 13
2012-09-06 08:59:46 PDT
Comment on
attachment 162479
[details]
Patch Clearing flags on attachment: 162479 Committed
r127746
: <
http://trac.webkit.org/changeset/127746
>
WebKit Review Bot
Comment 14
2012-09-06 08:59:50 PDT
All reviewed patches have been landed. Closing bug.
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