Community
    • Login

    Dialogs very slow to open

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    13 Posts 3 Posters 1.2k 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.
    • Michael BrockM
      Michael Brock
      last edited by

      A month or so ago I started finding that the file dialogs in Notepad++ are very slow to open. The File ->Open dialog typically takes 10-15 seconds as does the “save as” dialog.

      After about 10 seconds, the window blinks and the top bar becomes white. About 5 seconds after that the dialog opens.

      I am running version 7.8.1 on a Windows 10 machine with a 4790K processor and 16gb of ram. I haven’t seen any indication that it is an issue with resources. The drive is an SSD and I have not had any issues with Windows File Explorer itself. It is very snappy.

      Any ideas?

      1 Reply Last reply Reply Quote 0
      • EkopalypseE
        Ekopalypse
        last edited by

        What happens if you try a zipped version?
        Extract it to a folder of your choice, make sure npp is NOT running and
        execute npp from the zipped version. Is it as slow as the installed one?
        Can you post your debug info, which is available from the last menu item, the ? menu?

        1 Reply Last reply Reply Quote 2
        • Michael BrockM
          Michael Brock
          last edited by

          Running the zipped version has the exact same issue. Maybe a second faster to the “open file” dialog.
          If it is a “clue”, the first time I open the “settings->Preferences” window it also takes quite a while, maybe 30 seconds. Long enough that the top bar of the window shows “(not responding)” until ultimately it does. It has the issue on both the regular installed version and the zipped version.

          The “Debug info” (from the zipped version):

          Notepad++ v7.8.2 (64-bit)
          Build time : Dec 4 2019 - 01:39:49
          Path : D:\Downloads\npp.7.8.2.bin.x64\notepad++.exe
          Admin mode : OFF
          Local Conf mode : ON
          OS Name : Windows 10 Home (64-bit)
          OS Version : 1903
          OS Build : 18362.476
          Plugins : mimeTools.dll NppConverter.dll NppExport.dll

          EkopalypseE 1 Reply Last reply Reply Quote 0
          • andrecool-68A
            andrecool-68
            last edited by

            Clean up the system disk from temporary files. I advise you to use the free program “CCleaner”. And check how much free space is available on the system disk!

            1 Reply Last reply Reply Quote -1
            • andrecool-68A
              andrecool-68
              last edited by andrecool-68

              You can also do a disk check for the integrity of system files. Run the command line from the administrator and run sfc / scannow

              1 Reply Last reply Reply Quote 2
              • EkopalypseE
                Ekopalypse @Michael Brock
                last edited by

                @Michael-Brock

                Beside the tips from @andrecool-68 you can try to run process monitor
                and see what is going on.
                Set a filter for npp application and see where the lag is coming from.

                In addition you can scan your hard disc with tools like crystal disc info
                to see if the ssd is starting to die.

                Also consult the event viewer(eventvwr.exe) to see if there are
                any hints logged in windows logs.

                1 Reply Last reply Reply Quote 2
                • Michael BrockM
                  Michael Brock
                  last edited by

                  I scanned the drives with Crystal Disc Info and everything checks out as good. Also no issues found with sfc /scannow. I ran CCleaner and cleaned up the temp files and registry and that seems to have made a significant difference.

                  Thanks for the help!

                  andrecool-68A 1 Reply Last reply Reply Quote 0
                  • andrecool-68A
                    andrecool-68 @Michael Brock
                    last edited by

                    @Michael-Brock You can also use Vit Registry Fix Free Edition, this utility can find some more temporary temporary garbage in the system.

                    1 Reply Last reply Reply Quote 0
                    • Michael BrockM
                      Michael Brock
                      last edited by

                      Unfortunately, the “fix” turned out not to be one.

                      A short while after thinking that I had it fixed the issue has returned. The "open file dialog takes about 15 seconds to open. Before it does the top bar of Notepad++ displays window’s “not responding” message. It then blinks a few times, and the dialog opens.

                      The same thing happens when first opening the Settings -> Preferences, but it takes even longer. Almost 30 seconds before the dialog opens.

                      I downloaded the zip file version and running that exhibits the exact same issue. So it does not appear to be an issue with the profile or configuration files.

                      1 Reply Last reply Reply Quote 0
                      • Michael BrockM
                        Michael Brock
                        last edited by

                        I think I have figured out the issue…this time for real. Following along with task manager, I noticed that every time I opened the file dialog or settings -> preferences that a process called"Tortoisegit status cache" was also opening and causing issues. Disabling the status cache in tortoisegit has solved the issue with slow opening dialogs in Notepad++!

                        Now I need to figure out why it frequently loses settings on the “Backup” tab and why the latest update killed all of my Pythonscript scripts…

                        1 Reply Last reply Reply Quote 3
                        • EkopalypseE
                          Ekopalypse
                          last edited by

                          @Michael-Brock said in Dialogs very slow to open:

                          Now I need to figure out why it frequently loses settings on the “Backup” tab

                          Could it be that you run some automated cleaner software like CCleaner?
                          I know that this deleted my APPDATA files once.

                          and why the latest update killed all of my Pythonscript scripts…

                          Script for PythonScript plugin? If so, you need to update the plugin
                          to the latest version as a new scintilla version has been introduced by npp which changed the notification structure used by plugins.

                          Michael BrockM 1 Reply Last reply Reply Quote 2
                          • Michael BrockM
                            Michael Brock @Ekopalypse
                            last edited by

                            @Ekopalypse

                            I had actually already updated the plugin and that is what caused the scripts to stop working. Easy fix though. The update made a “bak” copy of its original folder which is where my custom scripts were located. Once I figured that out it was just a matter of copying them from the _bak folder to the active one.

                            “Could it be that you run some automated cleaner software like CCleaner?
                            I know that this deleted my APPDATA files once.”

                            I don’t run any automated cleaner. Specifically, it is the Settings -> Preferences -> Backup -> Backup on save setting that gets reverted. It will stay set through opening/closing the program for a while. Invariably I find it has un-set itself when I go hunting for a back-up copy and find that it hasn’t been saving them. It may actually be reverted by updates, as I don’t frequently need the back-ups. I’ll have to keep an eye out the next time an update is released.

                            EkopalypseE 1 Reply Last reply Reply Quote 0
                            • EkopalypseE
                              Ekopalypse @Michael Brock
                              last edited by Ekopalypse

                              @Michael-Brock

                              Because you already using pythonscript plugin it might be helpful
                              to let a script like this

                              from Npp import notepad
                              from os import path
                              import xml.etree.ElementTree as et
                              from pprint import pformat
                              
                              # <GUIConfig name="Backup" action="0" useCustumDir="no" dir="" isSnapshotMode="yes" snapshotBackupTiming="7000" />
                              expected_settings = {'name': "Backup",
                                                   'action': "0",
                                                   'useCustumDir': "no",
                                                   'dir': "",
                                                   'isSnapshotMode': "yes",
                                                   'snapshotBackupTiming': "7000",
                                                   }
                              
                              plugin_config_dir = notepad.getPluginConfigDir()
                              npp_config_dir = path.join(plugin_config_dir, r'..\..')
                              config_xml = path.abspath(path.join(npp_config_dir, r'config.xml'))
                              
                              if path.exists(config_xml):
                                  xml_doc = et.parse(config_xml)
                                  node = xml_doc.find('GUIConfigs/GUIConfig[@name="Backup"]')
                                  current_settings = { x:y for x,y in node.items()}
                                  if expected_settings != current_settings:
                                      template = ('name == {name}\r\n'
                                                  'action == {action}\r\n'
                                                  'useCustumDir == {useCustumDir}\r\n'
                                                  'dir == {dir}\r\n'
                                                  'isSnapshotMode == {isSnapshotMode}\r\n'
                                                  'snapshotBackupTiming == {snapshotBackupTiming}\r\n')
                                      current = template.format(**current_settings)
                                      expected = template.format(**expected_settings)
                                                 
                                      notepad.messageBox(('Backup settings have been changed\r\n\r\n'
                                                          'expected:\r\n\r\n{0}\r\n\r\n'
                                                          'received:\r\n\r\n{1}').format(expected, current),
                                                          'BACKUP SETTINGS CHECK')
                              
                              else:
                                  notepad.messageBox(('Unable to find:\r\n\r\n{0}\r\n\r\n'
                                                      'Backup settings might be lost!').format(config_xml),
                                                      'BACKUP SETTINGS CHECK')
                              

                              run on every npp startup. Put it in user startup.py and make sure
                              your configuration is set to ATSTARTUP then your expected
                              settings will be checked against current xml setting each time npp starts. Of course you need to adapt the expected settings to your need.

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