Community
    • Login

    Ability to cancel long running search operations

    Scheduled Pinned Locked Moved General Discussion
    7 Posts 3 Posters 1.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Dave SparksD
      Dave Sparks
      last edited by

      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.

      e62b841c-a208-43fa-80a8-0c289218cd1b-image.png

      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

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones @Dave Sparks
        last edited by

        @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++.

        1 Reply Last reply Reply Quote 1
        • Dave SparksD
          Dave Sparks
          last edited by

          @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:

          5f18290a-4657-4f14-8d5f-fba25e3f1fef-image.png

          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

          PeterJonesP 1 Reply Last reply Reply Quote 0
          • PeterJonesP
            PeterJones @Dave Sparks
            last edited by

            @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:

            5f18290a-4657-4f14-8d5f-fba25e3f1fef-image.png

            And my screenshot disagrees:

            d8d349be-1211-4f3a-995c-c87fe2cbe706-image.png

            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 
            
            1 Reply Last reply Reply Quote 1
            • Nick BrownN
              Nick Brown
              last edited by Nick Brown

              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.

              1 Reply Last reply Reply Quote 2
              • Dave SparksD
                Dave Sparks
                last edited by

                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 
                
                
                PeterJonesP 1 Reply Last reply Reply Quote 0
                • PeterJonesP
                  PeterJones @Dave Sparks
                  last edited by

                  @Dave-Sparks ,

                  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.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  The Community of users of the Notepad++ text editor.
                  Powered by NodeBB | Contributors