New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grep search makes IDE unresponsive when searching massive amounts of directories with non-matching files #2

Open
jpluimers opened this Issue Oct 13, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@jpluimers
Owner

jpluimers commented Oct 13, 2017

If the grep search goes through a massive amounts of directories with non-matching files (for instance when initiating a recursive search for anything Pascal like from C:), then:

  1. the IDE becomes sluggish and often unresponsive
  2. the IDE does not show where the search currently is inside the directory tree

Proposed solution is to add a TfmGrepResults.StartDirectorySearch similar to TfmGrepResults.StartFileSearch which updates the UI and performs an Application.ProcessMessages.

Then hook this method to a new event TGrepSearchRunner.OnSearchDirectory which works similar to TGrepSearchRunner.OnSearchFile, but on the directory level performing a call-back right after the FindFirst occurences 1 and 2, but not inside the while loop repetitions.

If the situation stays sluggish or unresponsive, then move the call-back inside the while loop repetitions.

jpluimers pushed a commit that referenced this issue Dec 27, 2017

jeroen
Patches submitted by Jeroen:
for the following issues:
1 #3
 Allow delete key in grep search `Results` pane to delete an entry
 The popup menu for the Results pane has a Delete action bound to it, but it has no keyboard shortcut.
 Add a shortcut for the Del key, then verify it deletes the correct entry.

2 #2
 Grep search makes IDE unresponsive when searching massive amounts of directories with non-matching files
 If the grep search goes through a massive amounts of directories with non-matching files (for instance when
 initiating  a recursive search for anything Pascal like from C:), then:
   1. the IDE becomes sluggish and often unresponsive
   2. the IDE does not show where the search currently is inside the directory tree
 Proposed solution is to add a TfmGrepResults.StartDirectorySearch similar to TfmGrepResults.StartFileSearch which
 updates the UI and performs an Application.ProcessMessages.
 Then hook this method to a new event TGrepSearchRunner.OnSearchDirectory which works similar to
 TGrepSearchRunner.OnSearchFile, but on the directory level performing a call-back right after the FindFirst occurences
 1 and 2, but not inside the while loop repetitions.
 If the situation stays sluggish or unresponsive, then move the call-back inside the while loop repetitions.

git-svn-id: https://svn.code.sf.net/p/gexperts/code/trunk@2120 03fc42d2-69ba-4c40-8a67-5bfb646c2f2c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment