New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 651610 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

DevTools: console logging a ton of errors takes a long time to clear

Project Member Reported by l...@chromium.org, Sep 29 2016

Issue description

Version: 55

What steps will reproduce the problem?
(1) Open DevTools console and evaluate 'for (var i=0; i<20000; i++) console.error(i)'
(2) Press Ctrl-L or the clear console button

What is the expected output?
Should clear quickly

What do you see instead?
Takes awhile to clear

This now works fine when you evaluate it in the console, but, it's still slow if the original errors were generated from a script or snippet.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Mar 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4aab7a540a5ce356f6ddd9455c9ac35b83315a29

commit 4aab7a540a5ce356f6ddd9455c9ac35b83315a29
Author: luoe <luoe@chromium.org>
Date: Sat Mar 18 03:37:52 2017

DevTools: more efficiently dispose messages on console clear

When logging 100k errors in console and clearing, it can take 10sec in
PresentationConsoleMessageHelper._consoleCleared(). This CL changes the
function's logic and lets all relevant uiSourceCodes know about all
messages to be removed, instead of removing one-by-one.

BUG= 651610 

Review-Url: https://codereview.chromium.org/2752333002
Cr-Commit-Position: refs/heads/master@{#457951}

[modify] https://crrev.com/4aab7a540a5ce356f6ddd9455c9ac35b83315a29/third_party/WebKit/Source/devtools/front_end/source_frame/UISourceCodeFrame.js
[modify] https://crrev.com/4aab7a540a5ce356f6ddd9455c9ac35b83315a29/third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js

Comment 2 by l...@chromium.org, Mar 28 2017

Status: Fixed (was: Assigned)

Comment 3 by l...@chromium.org, Apr 14 2017

Status: Assigned (was: Fixed)
While the original bug was fixed, I'm reopening this, as an extremely related scenario is still broken.  In the original bug, clearing a console full of errors generated by user evaluation in the prompt took a long time.  The culprit was a quadratic time complexity in removing all the messages from the debugger VM's uiSourceCode.

If the errors originate from a script file or snippet, we go down UISourceCodeFrame's removeMessage() path as well.  This case should be addressed.

New case repro:
- Create a snippet with the original code
- Run the snippet
- Clear the console

Comment 4 by l...@chromium.org, Apr 17 2017

Description: Show this description
Project Member

Comment 5 by bugdroid1@chromium.org, Apr 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f677ae05d0b2e54b4876b3921a0dc1b9d66b4a21

commit f677ae05d0b2e54b4876b3921a0dc1b9d66b4a21
Author: luoe <luoe@chromium.org>
Date: Wed Apr 26 18:47:40 2017

DevTools: avoid slowdown from unnecessary DOM, style mutations on CodeMirrorTextEditor

Logging console messages that generate decorations (wavy underline under errors)
will cause a slowdown. UISourceCodeFrame's _updateDecorations() can remove and
re-add the same decoration or CSS class from a line, even if it did not change.

This CL avoids removing a decoration/class if the new one is the same.

BUG= 651610 

Review-Url: https://codereview.chromium.org/2820253002
Cr-Commit-Position: refs/heads/master@{#467394}

[modify] https://crrev.com/f677ae05d0b2e54b4876b3921a0dc1b9d66b4a21/third_party/WebKit/Source/devtools/front_end/source_frame/UISourceCodeFrame.js

Comment 6 by l...@chromium.org, May 1 2017

Status: Fixed (was: Assigned)

Sign in to add a comment