Address pathological code completion performance in devtools console |
|||||||||||||
Issue description
Chrome Version : 62.0.3202.75
OS Version:
URLs (if applicable) :
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
Safari 5:
Firefox 4.x:
IE 7/8/9:
What steps will reproduce the problem?
1. Run a web app with a large number (240000+) of global variables.
2. Use the javascript console to place a debugger in any method.
3. Attempt to type in the console.
What is the expected result?
Typing works
What happens instead of that?
The code completion tool attempts to match against all of the global variables and causes typing to hang for tens of seconds or minutes.
I know it sounds unreasonable to have so many global variables, but my team runs a very large app that is compiled in a way that results in this many global variables. It is not always an option for us to run with uncompiled code.
If we could simply have an option to turn off code completion it would solve our issue.
UserAgentString: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.75 Safari/537.36
,
Nov 14 2017
Thanks woxxom@ for the workaround. ruththompson@: Could you please attach any sample app to test and confirm this also, please confirm if the workaround suggested above works for you.
,
Nov 14 2017
@woxxom Thank you so much for that workaround, yes it works! @divyapadigela, I'll see if I can throw an example together soon. I don't have time to do it this week.
,
Nov 14 2017
Thank you for providing more feedback. Adding requester "divya.padigela@techmahindra.com" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Nov 14 2017
,
Nov 14 2017
Do we need to fetch only the viewport rows to support this use case?
,
Nov 14 2017
,
Nov 14 2017
FWIW, a simple repro: 1. open a new tab page 2. open devtools (Ctrl-Shift-I key) 3. paste and run the following code: for (var i = 0; i < 200e3; i++) window['var' + i] = true 4. type the following: var123 Expected: able to type without delays Observed: several second delay after typing each letter depending on CPU speed
,
Nov 14 2017
Just kidding, here is an example:
,
Nov 14 2017
oh. Yes, same as woxxom's repro.
,
Dec 19 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d5ed67e13e9939c00aed1876e8701cb47101cf6f commit d5ed67e13e9939c00aed1876e8701cb47101cf6f Author: Joel Einbinder <einbinder@chromium.org> Date: Tue Dec 19 01:53:13 2017 DevTools: Make console autocomplete faster This introduces caching of autocompletions, small tweaks to increase performance, and converts JavaScriptAutocomplete into a singleton instead of a set of functions. Bug: 784678 Change-Id: Iacdcd9d3a884f0377266663cdeb3d8cce48d72d1 Reviewed-on: https://chromium-review.googlesource.com/770254 Commit-Queue: Joel Einbinder <einbinder@chromium.org> Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org> Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Cr-Commit-Position: refs/heads/master@{#524902} [modify] https://crrev.com/d5ed67e13e9939c00aed1876e8701cb47101cf6f/third_party/WebKit/LayoutTests/http/tests/devtools/console-cd-completions.js [modify] https://crrev.com/d5ed67e13e9939c00aed1876e8701cb47101cf6f/third_party/WebKit/LayoutTests/http/tests/devtools/console-completions.js [modify] https://crrev.com/d5ed67e13e9939c00aed1876e8701cb47101cf6f/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger/debugger-completions-on-call-frame.js [modify] https://crrev.com/d5ed67e13e9939c00aed1876e8701cb47101cf6f/third_party/WebKit/Source/devtools/front_end/console/ConsolePrompt.js [modify] https://crrev.com/d5ed67e13e9939c00aed1876e8701cb47101cf6f/third_party/WebKit/Source/devtools/front_end/object_ui/JavaScriptAutocomplete.js [modify] https://crrev.com/d5ed67e13e9939c00aed1876e8701cb47101cf6f/third_party/WebKit/Source/devtools/front_end/object_ui/ObjectPropertiesSection.js
,
Feb 5 2018
,
Feb 12 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e0c6ec427c2d94c785d1b4e6ac16bd4dbd1d6ad1 commit e0c6ec427c2d94c785d1b4e6ac16bd4dbd1d6ad1 Author: Joel Einbinder <einbinder@chromium.org> Date: Mon Feb 12 22:42:10 2018 DevTools: Limit autocomplete items to 10000 per prototype Bug: 784678 Change-Id: If8d0eb1a6eb9488133917f3c275f64cd2405bd73 Reviewed-on: https://chromium-review.googlesource.com/914806 Reviewed-by: Pavel Feldman <pfeldman@chromium.org> Commit-Queue: Joel Einbinder <einbinder@chromium.org> Cr-Commit-Position: refs/heads/master@{#536220} [modify] https://crrev.com/e0c6ec427c2d94c785d1b4e6ac16bd4dbd1d6ad1/third_party/WebKit/Source/devtools/front_end/object_ui/JavaScriptAutocomplete.js
,
Feb 13 2018
Verified this issue on Debian Rodete with chrome #66.0.3346.0 and observed fix is working as expected, didn't observe any lags with provided code in comment #8,#9. hence adding TE-Verified labels. Attaching the screen-cast for reference.
,
Apr 5 2018
There's nothing Google-specific here, so trying to make the bug public (since I see access is causing some confusion).
,
Apr 5 2018
It looks like there's been some significant improvements here in Chrome 66. ruththompson@ can you try Chrome beta and tell us what you think?
,
Apr 5 2018
Sorry, scratch that - I've done what I should have done first and try the demo above myself, and it's still extremely laggy on a fast machine despite the 10,000 limit (which I assume was likely to make things a lot better). einbinder@ any other ideas? Is the 10,000 item limit actually working? Does it need to be even lower?
,
Apr 6 2018
I'm leaving this open until the patches hit stable, because we will only really know if things are fixed once developers are using the new autocomplete daily. But everything should be working in 66 (beta).
,
Jun 1 2018
,
Jun 1 2018
,
Jun 1 2018
This has been in stable for awhile now, should we call this bug fixed? I've pinged GMail folks to ask again, but feel free to resolve Fixed regardless as long as we're not aware of remaining issues here.
,
Jun 5 2018
GMail team says that they "verified that autocomplete is now working very well". Let's call this fixed. |
|||||||||||||
►
Sign in to add a comment |
|||||||||||||
Comment 1 by woxxom@gmail.com
, Nov 14 2017