WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
56559
Web Inspector: Scrolling and navigation is not smooth on a script with many long lines
https://bugs.webkit.org/show_bug.cgi?id=56559
Summary
Web Inspector: Scrolling and navigation is not smooth on a script with many l...
Andrey Adaikin
Reported
2011-03-17 06:49:46 PDT
Now we highlight all lines in the visible area synchronously. It takes noticeable time on source files that have many long lines (for example, obfuscated JavaScript code of GMail). Thus, scrolling and navigation via keys is not smooth on such cases. We should paint lines asynchronously. Tested on a file with 2K lines, 1M of bytes.
Attachments
Patch
(8.51 KB, patch)
2011-03-17 07:01 PDT
,
Andrey Adaikin
no flags
Details
Formatted Diff
Diff
Patch
(8.59 KB, patch)
2011-03-17 07:52 PDT
,
Andrey Adaikin
yurys
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Andrey Adaikin
Comment 1
2011-03-17 07:01:16 PDT
Created
attachment 86053
[details]
Patch
Andrey Adaikin
Comment 2
2011-03-17 07:52:04 PDT
Created
attachment 86055
[details]
Patch
Andrey Adaikin
Comment 3
2011-03-17 07:53:51 PDT
FYI. Diff between the first and the second patches: --- a/Source/WebCore/inspector/front-end/TextViewer.js +++ b/Source/WebCore/inspector/front-end/TextViewer.js @@ -844,9 +844,9 @@ WebInspector.TextEditorMainPanel.prototype = { if (!this._scheduledPaintLines) return; - if (this._dirtyLines) { - // Reschedule the timer. - this._paintScheduledLinesTimer = setTimeout(this._paintScheduledLines.bind(this), 10); + // Reschedule the timer if we still can not paint the lines, or the user is scrolling. + if (this._dirtyLines || this._repaintAllTimer) { + this._paintScheduledLinesTimer = setTimeout(this._paintScheduledLines.bind(this), 50); return; }
Yury Semikhatsky
Comment 4
2011-03-22 07:27:39 PDT
Comment on
attachment 86055
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=86055&action=review
> Source/WebCore/inspector/front-end/TextViewer.js:838 > + _paintScheduledLines: function(opt_skipRestoreSelection)
We don't use opt_ prefix in the inspector code.
> Source/WebCore/inspector/front-end/TextViewer.js:899 > + if (this._dirtyLines || this._scheduledPaintLines || this._paintLinesOperationsCredit < 0) {
You should check for this._paintLinesOperationsCredit < 0 at line 891 after painting next line and if the credit is exceeded schedule painting of all rest lines in the chunk.
Yury Semikhatsky
Comment 5
2011-03-22 07:28:10 PDT
Comment on
attachment 86055
[details]
Patch Please address the comments before landing.
Andrey Adaikin
Comment 6
2011-03-23 02:23:50 PDT
Comment on
attachment 86055
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=86055&action=review
>> Source/WebCore/inspector/front-end/TextViewer.js:838 >> + _paintScheduledLines: function(opt_skipRestoreSelection) > > We don't use opt_ prefix in the inspector code.
done
>> Source/WebCore/inspector/front-end/TextViewer.js:899 >> + if (this._dirtyLines || this._scheduledPaintLines || this._paintLinesOperationsCredit < 0) { > > You should check for this._paintLinesOperationsCredit < 0 at line 891 after painting next line and if the credit is exceeded schedule painting of all rest lines in the chunk.
done
Pavel Podivilov
Comment 7
2011-03-23 03:30:31 PDT
Committed
r81760
: <
http://trac.webkit.org/changeset/81760
>
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