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

Issue 680205 link

Starred by 7 users

Issue metadata

Status: Fixed
Owner:
Last visit 29 days ago
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

"Search across all sources" becomes extremely slow after page reload

Project Member Reported by q...@chromium.org, Jan 11 2017

Issue description

Chrome Version: 56.0.2924.51 (Official Build) beta (64-bit)
OS: Linux (but also observed on Windows 10 and MacOS)

What steps will reproduce the problem?
(1) open a complex webpage e.g. https://today.talkgadget.google.com/meet/kyb-jlq8-skg?jsmode=du
(2) go to the Js console and press Ctrl+Shift+F for "Search across all sources", search for a code fragment, e.g. "lookupCalendar_ ="
(3) observe that search results show up fairly quickly
(4) reload the page
(5) repeat step (2)

What is the expected result?

repeat of (3)

What happens instead?

code search taking extremely long time to show any results, if at all;
repeating steps (4) and (5) seems to make the problem worse
 

Comment 1 by alph@chromium.org, Jan 11 2017

Owner: lushnikov@chromium.org
Cannot repro neither on ToT nor on 56.0.2924.51 (Official Build) beta (64-bit)
Can you please record a screencast, perhaps I'm missing something.

Also can you please open DevTools on DevTools (just press Ctrl+Shift+I with DevTools focused) and record a timeline of the slow part.

Comment 2 by alph@chromium.org, Jan 11 2017

Status: Unconfirmed (was: Untriaged)

Comment 3 by alph@chromium.org, Jan 11 2017

Labels: Needs-Feedback

Comment 4 by ajha@chromium.org, Jan 16 2017

Labels: Needs-Triage-M56
Try search any code pieces on www.priceline.com/m/fly/search

Then you see how slow the search is!
*I mean the chrome inspector source code search
Cc: einbinder@chromium.org lushnikov@chromium.org
 Issue 673540  has been merged into this issue.
 Issue 661912  has been merged into this issue.
 Issue 669533  has been merged into this issue.
Status: Started (was: Unconfirmed)
Started: https://codereview.chromium.org/2692923013/
Project Member

Comment 11 by bugdroid1@chromium.org, Feb 22 2017

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

commit ceabef6794ee9885b0a3f52f5c948a8bee079a2c
Author: lushnikov <lushnikov@chromium.org>
Date: Wed Feb 22 22:57:09 2017

DevTools: do not search in anonymous scripts unless specifically asked for.

Today, the "search across all files" searches not only all sources
of the website, but also all ever-evaluated scripts.
This helps in certain kind of investigations, e.g. to find
anonymously-evaluated script which did some page modifications.

Most of the time, however, the "search across all files" is used to search
across the resources of the application. In this case, searching across all
scripts might become slow, especially since certain websites generate
a lot of scripts via eval().

This patch removes old "search in content scripts" setting and adds a new one:
"Search in dynamic scripts and extensions". With this setting on,
the "Search across all files" will search in both content scripts and
dynamically-added anonymous scripts. Otherwise, only named resources
will be searched.

BUG= 680205 
R=pfeldman, dgozman

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

[modify] https://crrev.com/ceabef6794ee9885b0a3f52f5c948a8bee079a2c/third_party/WebKit/LayoutTests/http/tests/inspector/search/sources-search-scope-expected.txt
[modify] https://crrev.com/ceabef6794ee9885b0a3f52f5c948a8bee079a2c/third_party/WebKit/LayoutTests/http/tests/inspector/search/sources-search-scope.html
[modify] https://crrev.com/ceabef6794ee9885b0a3f52f5c948a8bee079a2c/third_party/WebKit/Source/devtools/front_end/common/Settings.js
[modify] https://crrev.com/ceabef6794ee9885b0a3f52f5c948a8bee079a2c/third_party/WebKit/Source/devtools/front_end/sources/AdvancedSearchView.js
[modify] https://crrev.com/ceabef6794ee9885b0a3f52f5c948a8bee079a2c/third_party/WebKit/Source/devtools/front_end/sources/SourcesSearchScope.js
[modify] https://crrev.com/ceabef6794ee9885b0a3f52f5c948a8bee079a2c/third_party/WebKit/Source/devtools/front_end/sources/module.json

Cc: eostroukhov@chromium.org seththompson@chromium.org
Status: Fixed (was: Started)
This should be much better now. 

Comment 14 by zinke@google.com, Feb 24 2017

I think this should be reopened as fix didn't actually address the problem.

Our project uses a system of evals to expand our code to match our sources in dev mode. This has been the case for a while and searching sources has not been an issue until the last couple quarters.

This is even more noticeable when stopped at a breakpoint where often the search just hangs completely

Comment 15 by ralp...@google.com, Feb 24 2017

Would be great if source files were indexed in advance so the search would be instantaneous, at least for exact matches.
Status: Assigned (was: Fixed)
@zinke: do you guys eval sources without sourceURL comments? Do I understand correctly that you actually searched in anonymous scripts and then navigated around the "debugger://VMXXX" search results? (like on my screenshot)

The hanging bug is separate: crbug.com/597374

bad-search.png
249 KB View Download

Comment 17 by zinke@google.com, Feb 24 2017

@lushnikov We do use '//# sourceURL='
@zinke: ok, sounds good. I expect that landed CL should speed up search a lot on certain websites, please give it a shot.

We'll dig further if the problem remains.
Status: Fixed (was: Assigned)
Closing this since the issue seemed to be addressed.

Sign in to add a comment