Ability to cancel long running search operations
-
Hi,
When running a lengthy search using “Find in Files” or “Find All in Current Document”, the search dialog locks up and shows “(Not Responding)” in the title. There doesn’t seem to be any way to cancel or terminate the search. This can happen by accident - for example, by not noticing that the regular expression search mode is ticked as in the following screenshot.
According, to a reply to a previous post, there used to be a “big fat CANCEL button” but this doesn’t appear to be there on my installation of v8.1.4.
Thanks,
Dave -
@Dave-Sparks said in Ability to cancel long running search operations:
According, to a reply to a previous post, there used to be a “big fat CANCEL button” but this doesn’t appear to be there on my installation of v8.1.4.
Then you misread or misunderstood that previous post. Find in Files (two tabs over in your screenshot) has a big CANCEL button while it’s running. A normal single-file Find (even when you click Find All in Current Document or Find All in All Opened Documents) does not have a Cancel button, and, as far as I know, has no way to cancel/interrupt the search.
It might be nice to be able to interrupt/cancel such a search. Unfortunately, I don’t think there is currently a way. To get that feature added, you would have to make an official Feature Request, as described in our FAQ entry
And yes, I can confirm that if I have 2M lines of
ABCT18C9
and search for[T89]
in normal mode, it will correctly exit finding none in a few seconds; but if I accidentally search for[T89]
in regex mode instead of normal mode, it goes into “Not Responding” for at least 5 minutes, whereupon I killed Notepad++. -
@PeterJones said in Ability to cancel long running search operations:
Then you misread or misunderstood that previous post.
No… but I think you may have misread or misunderstood mine 😀
@dave-sparks said in Ability to cancel long running search operations:
When running a lengthy search using “Find in Files” or “Find All in Current Document”
See the following screenshot for an example:
After waiting at least 5 minutes, a progress bar does appear and that does have a Cancel button, however I’m usually already on the kill button by then.
I’ll make a Feature Request on github as described.
Thanks.
Dave Sparks -
@Dave-Sparks said in Ability to cancel long running search operations:
@PeterJones said in Ability to cancel long running search operations:
Then you misread or misunderstood that previous post.
No… but I think you may have misread or misunderstood mine 😀
Sorry, it’s easy to get confused when your screenshot says one thing (FIND tab shown in screenshot) but your text says another.
When running a lengthy search using “Find in Files” or “Find All in Current Document”
See the following screenshot for an example:
And my screenshot disagrees:
I’ll make a Feature Request on github as described.
If you do, make sure you share your ?-menu’s Debug Info. Really, I would suggest sharing that here first, to see if we can replicate your problem. Because as shown above, I cannot replicate the problem: the progress bar comes up fine on Find in Files.
Notepad++ v8.1.4 (64-bit) Build time : Aug 21 2021 - 13:04:59 Path : C:\usr\local\apps\notepad++\notepad++.exe Command Line : Admin mode : OFF Local Conf mode : ON Cloud Config : OFF OS Name : Windows 10 Enterprise (64-bit) OS Version : 2009 OS Build : 19042.1165 Current ANSI codepage : 1252 Plugins : AutoSave.dll ComparePlugin.dll ExtSettings.dll MarkdownViewerPlusPlus.dll mimeTools.dll NppConsole.dll NppConverter.dll NppEditorConfig.dll NppExec.dll NppExport.dll NppFTP.dll NppUISpy.dll PreviewHTML.dll PythonScript.dll QuickText.dll TagLEET.dll XMLTools.dll
-
The delay will also depend on the number of files that there is under the D:\UserLogs, and the number of sub directories and files in those sub directories as well as the In all sub-folders is checked.
If you have 500,000 files in that directory tree it is going to be a while before the Find in Files progress box appears.
Also note that you have no filter set so that it is going to search every file in that directory tree, if you can set a filter so that only the files you need to search are searched.
-
It happens with only one file in the search directory. See https://davesparks.tinytake.com/msc/NTgxMTA2N18xNzg1NDgyNg
If there is more than one file, then it takes a lot longer. Sometimes the “Find In Files progress…” dialog does appear almost straight away, but more often it does not appear at all.
Here’s the debug info:
Notepad++ v8.1.4 (64-bit) Build time : Aug 21 2021 - 13:04:59 Path : C:\Program Files\Notepad++\notepad++.exe Command Line : Admin mode : OFF Local Conf mode : OFF Cloud Config : OFF OS Name : Windows 10 Pro (64-bit) OS Version : 2009 OS Build : 19043.1202 Current ANSI codepage : 1252 Plugins : DSpellCheck.dll mimeTools.dll NppConverter.dll NppExport.dll
-
As my screenshot indicates, the Find In Files progress… reliably shows up on my v8.1.4 edition; the folder I showed an example from had a ~50MB text file (the one shown), a couple of small text files, and a couple of binary files, and it had no problem starting the progress dialog with the cancel button.
That said, I guess that this point, you really should file a bug report (making sure you link that video in the report), because even though I cannot replicate your problem, it appears to be a real issue where the existing feature is not working for you, for whatever reason.