debugger icon indicating copy to clipboard operation
debugger copied to clipboard

Full Project Search is really slow

Open andreicristianpetcu opened this issue 8 years ago • 10 comments

I use Ctrl+Shift+F in a pretty large Angular project. It takes a lot of time and it seems not to find any results. Also it generates a lot of LOAD_SOURCE_TEXT events.

Here is a video: https://vimeo.com/266454867

I cannot share the app I am working on :( but I can run de debugger locally with whatever profiling tool you would like. I can build it from branch if that helps.

andreicristianpetcu avatar Apr 25 '18 08:04 andreicristianpetcu

I attached the profile zip file. You can just hit F12 in Firefox go to performance and click the import button to see it visually. profile.json.zip

Would a profile with Gecko Profiler help?

andreicristianpetcu avatar Apr 25 '18 08:04 andreicristianpetcu

Thanls a lot @andreicristianpetcu . Are you running the project from firefox devtools (if so which version), or via a clone of this repo ? Could you also try to profile with http://perf-html.io/ and upload the profile please ?

nchevobbe avatar Apr 25 '18 08:04 nchevobbe

I'm running it from this commit

50e1c03 April 24th (#6084) (Jason Laster, 14 hours ago)

andreicristianpetcu avatar Apr 25 '18 08:04 andreicristianpetcu

Here you go! @nchevobbe https://perfht.ml/2FfedSg Happy hacking! :)

andreicristianpetcu avatar Apr 25 '18 09:04 andreicristianpetcu

Current issue with full search is that we first request a source text from server and then search in it on the client side. So when there are a lot of files, a lot of time goes in this source text transfer, from server to client and from client to web worker.

Can we move this search operation on server side? If we do, we will receive few lines per source from server and if user chooses to go to file, we can then request the entire file. So this way, we need not request all scripts from server, and we can save both time and memory.

AnshulMalik avatar Sep 14 '18 06:09 AnshulMalik

@AnshulMalik server-side approach would be great.

We should also limit the number of results shown. so pagination with scolling would be cool. Like show 100 results, then when you scroll down show a link for more or automatically render more...

jasonLaster avatar Sep 17 '18 14:09 jasonLaster

I started to take a peak at this.

From the debugger ux review doc

Search sources Big performance issue - should show first e.g. 10 results for each file, with more button

I did a quick spike into limiting matches per file, it definitely sped big searches up a lot. I searched for "e" on gmail before and it would time out, but after limiting it only took a few seconds.

WenInCode avatar Dec 07 '18 04:12 WenInCode

/claim

WenInCode avatar Dec 07 '18 04:12 WenInCode

Thanks for claiming the issue! :wave:

Here are some links for getting setup, contributing, and developing. We're always happy to answer questions in slack! If you become busy, feel free to /unclaim it.

:fox_face: Debugger team!

claim avatar Dec 07 '18 04:12 claim

@AnshulMalik lets close this when your work finishes up

jasonLaster avatar Dec 20 '18 16:12 jasonLaster