Notepad-plus-plus: Search in files speed hampered by updating window

Created on 5 Jun 2018  ·  3Comments  ·  Source: notepad-plus-plus/notepad-plus-plus

Description of the Issue

Search in files is slowed by updating the window for every file searched. I have a PC with an M2 SSD and am searching around 10,000 files. This takes an appreciable amount of time even with latest i7 etc

In my experience coding C++ applications with a lot of progress updates, performance was improved by only updating the progress periodically e.g. every half second. Similarly, check for Cancel being pressed at a slower interval rather than at every update.

Steps to Reproduce the Issue

With a very large set of files execute the search in files. The filename updates very rapidly, eating CPU time.

Expected Behavior

Not every Filename is shown - just updating at a reduced interval eg every half second.

Most helpful comment

If you think that has no side effects, issue a pull request so it's easier to review/comment on!

All 3 comments

Grabbed the code, and I would suggest a few changes:

  1. Limit filesPerPercent so that its max value is say 100.
  2. Move the code if (progress.isCancelled()) break; within the code executed if if (i == updateOnCount) is true.
  3. Remove the else part of the if statement if (i == updateOnCount)

If you think that has no side effects, issue a pull request so it's easier to review/comment on!

@bairgon

for searching within 10'000+ files, i would recommend the use of external, more powerful search programs, like the free FileSeek from BinaryFortress, instead of passing them to notepad++ for processing.
search programs like this are highly customisable and have notepad++ integration at their settings.

thank you for your help and best regards.


general notes:

please close your issues as soon as you are satisfied, to help
keeping the notepad++ issue tracker clean.

when creating a new issue, please provide all information as shown at the issue template.
your notepad++ debug info is part of the minimum requirements.
(? > Debug Info... > Copy debug info into clipboard).

please also conduct a search at the issue tracker beforehand, to check if a similar issue
already exists.

for general questions, or if it is not sure, whether your issue is directly related to
the notepad++ source code, please visit us at the notepad++ community forum, and
search if related topics exists. you are welcome to post either at similar
topics, or to create a new topic at Help Wanted or General Discussion.
(no extra account is needed, just use your github account to sign in)

                        Click here to visit the Notepad++ Community Forum                         

Was this page helpful?
0 / 5 - 0 ratings

Related issues

softmgr picture softmgr  ·  3Comments

masberg picture masberg  ·  3Comments

martbase picture martbase  ·  3Comments

SlySven picture SlySven  ·  3Comments

WizADSL picture WizADSL  ·  3Comments