Community
    • Login

    Plugins - too much of a good thing

    Scheduled Pinned Locked Moved General Discussion
    6 Posts 3 Posters 329 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.
    • artie-finkelsteinA
      artie-finkelstein
      last edited by

      Having spent entirely too much time working with a mysterious loss of control of plugin menus, I wish to share the knowledge to help other users avoid the aggravation.

      TL;DR: Installed plugins incur a cost even if they are not being used. Each menu item uses up one of the 500 available plugin command IDs.

      See …\PowerEditor\src\resource.h { ID_PLUGINS_CMD_LIMIT & ID_PLUGINS_CMD }

      Notepad++ will silently ignore attempts to activate any menu items encountered after the 500th ID is enumerated. The plugins themselves will continue to operate, but options and actions controlled using the \Plugins’plugin’\ menu will not be acted on.


      Notes on the attached table:

      A menu item is one of the text lines (black or grey) that shows up as the mouse is dragged down a plugin menu.

      A lower level menu item means there is no dialog expansion triangle on the right side of the menu list.

      PythonScript seems to violate this rule with it’s expansion of ‘Scripts\Samples’, but I cannot be certain as I am just starting my Python & PythonScript education.

      NppExec expands beyond it’s initial 19 menu items when scripts are added by use of the ‘Advanced Options…’ dialog. Additional consoles each use another 19 IDs assuming no added links to their ‘Advanced Options…’ ‘Menu Items’.

      Note that the venerable NppTextFX uses 31% of the available ID locations.

      The lesson: Don’t keep plugins installed if you don’t use them.

      items       plugin                             DLL
      menu+lower  name                    version      date
      ----------  ----------------------  -----------  ---------------------
        2         BetterMultiSelection    v1.4.0.0     (2021.05.26  7:45 AM)
       15         BookmarksDook           v2.3.3.0     (2021.04.29  1:01 AM)
        4         ColumnTools             v1.4.2.1     (2021.05.19  9:38 AM)
        3         CustomLineNumbers       v1.1.7.0     (2020.08.16  4:01 PM)
        8         DSpellCheck             v1.4.21.0    (2021.06.20  7:05 PM)
       13         Explorer                v1.8.2.16    (2021.04.29  2:20 AM)
        2         ExtSettings             v1.2.1.0     (2019.10.06  2:52 PM)
        2         FallingBricks           v1.1.0.0     (2008.09.24  8:41 PM)
       13         FingerText              v0.5.60.0    (2012.05.03  7:20 AM)
        6         Linefilter3             v1.0.0.0     (2019.09.23  5:35 PM)
        6         LuaScript               v0.11.0.0    (2021.03.15  7:39 PM)
        4         MarkdownViewerPlusPlus  v0.8.2.0     (2019.01.12 12:01 AM)
        2         MenuIcons               v1.2.3.0     (2021.04.23 10:36 AM)
       14         mimeTools               v2.6.0.0     (2021.07.15  7:11 PM)
        4         NPPJSONViewer           v1.40.0.0    (2020.07.11  5:55 PM)
        3         NavigateTo              v1.12.3.0    (2018.03.13 11:29 AM)
        5         NppCalc                 v1.5.0.0     (2021.07.09  2:13 PM)
        3         NppColumnSort           v1.0.0.2     (2014.01.19  3:38 PM)
        5         NppConverter            v4.3.0.0     (2021.07.15  7:11 PM)
        3         NppEditorConfig         v0.4.0.0     (2019.02.21  6:45 AM)
        3         NppEventExec            v0.9.0.0     (2017.08.14 12:37 PM)
       19+13      NppExec                 v0.6.9.9     (2021.07.22  1:05 PM)
        5         NppExport               v0.3.0.0     (2021.07.15  7:11 PM)
        3         NppFTP                  v0.29.7.0    (2021.03.17 12:03 AM)
        7         NppFavorites            v1.0.0.1     (2018.10.15  9:38 PM)
        4         NppHorizontalRuler      v1.0.0.3     (2019.01.16  5:50 PM)
        2         NppJumpList             v1.2.2.0     (2015.04.10  6:04 PM)
        4         NppMenuSearch           v0.9.3.0     (2019.10.22 11:55 PM)
        1         NppPlates               v0.1.0.0     (2016.01.07  8:36 PM)
        5         NppQCP                  v2.1.1.1     (2021.02.22  7:53 PM)
        5         NppSnippets             v1.6.0.0     (2021.03.17 12:03 AM)
      157         NppTextFX               v0.2.6.0     (2016.01.06  7:26 PM)
       31         NppTextViz              v0.4.2.0     (2020.05.29  9:15 PM)
       11         NppToolBucket           v1.10.6622.4 (2018.02.17  6:57 AM)
        2         NppUISpy                v1.0.4.0     (2019.06.26 11:37 AM)
        2         OpenFileInFolders       v1.0.0.1     (2017.07.13  3:32 PM)
        4         pork2sausage            v2.2.0.0     (2021.06.02  6:07 AM)
        9         PreviewHTML             v1.3.2.0     (2019.03.16  4:57 AM)
        8+17      PythonScript            v1.5.4.0     (2020.04.21  4:02 PM)
        5         QuickText               v0.1.4.1     (2020.03.30  8:13 AM)
        1         RegRexPlace             v?.?.?.?     (2014.01.19  3:40 PM)
        8         selectNLaunch           v2.1.0.0     (2019.01.11 11:42 PM)
        8         Tidy2                   v0.2.0.0     (2016.01.07  8:34 PM)
       24         ZenCoding-Python        v0.7.0.1     (2014.01.19  3:44 PM)
        2         ZoomDisabler            v1.2.0.0     (2016.09.27  8:25 PM)
        5         _CustomizeToolbar       v5.1.0.0     (2021.07.22  6:29 PM)
      
      
      1 Reply Last reply Reply Quote 5
      • mere-humanM
        mere-human
        last edited by

        @artie-finkelstein said in Plugins - too much of a good thing:

        Notepad++ will silently ignore attempts to activate any menu items encountered after the 500th ID is enumerated.

        Maybe, you should report a bug for it on GitHub.

        artie-finkelsteinA 1 Reply Last reply Reply Quote 0
        • artie-finkelsteinA
          artie-finkelstein @mere-human
          last edited by

          @mere-human - I’m not sure it’s an outright bug. Being silent about the ‘attempted overflow’ is not nice behavior, but the limits I exceeded are published.

          I’m still investigating other corners of this little escapade. My numbers in the table in the original posting are correct in a first order sense (i.e., they were hand counted and are within 10% of the listed value).

          So far, the only more reliable way I’ve found to determine the resource usage of a plugin is to install it and then probe it with the NppUISpy plugin by @dinkumoil (Andreas Heim). I love the irony of loading yet another plugin to investigate the resource usage of previously installed plugins.

          PeterJonesP mere-humanM 2 Replies Last reply Reply Quote 2
          • PeterJonesP
            PeterJones @artie-finkelstein
            last edited by

            @artie-finkelstein said in Plugins - too much of a good thing:

            I’m not sure it’s an outright bug.

            But you could phrase it as a feature request, giving an example of your usage showing it’s not that hard to get enough Plugins menu entries to use up the 500-entry limit, which might be enough to convince them to change the ID_PLUGINS_CMD_LIMIT from 22500 to 22999 (giving about 1000, not just 500)… or change from 22000…22500 to 30000…39999 to give plenty of room for even the plugin-est installation ever.

            artie-finkelsteinA 1 Reply Last reply Reply Quote 1
            • mere-humanM
              mere-human @artie-finkelstein
              last edited by

              @artie-finkelstein said in Plugins - too much of a good thing:

              I’m not sure it’s an outright bug. Being silent about the ‘attempted overflow’ is not nice behavior, but the limits I exceeded are published.

              Maybe, it’s not a bug. But it makes some use cases uncomfortable. So we can think about such improvements as:

              1. Show a warning when the plugin maximum is exceeded.
              2. Increase the plugin maximum value.
              3. Some workaround that doesn’t need us to rely on the numbers at all.

              1 and 2 seem quite valid and feasible.
              Feel free to create GitHub issues for these if you want.

              1 Reply Last reply Reply Quote 2
              • artie-finkelsteinA
                artie-finkelstein @PeterJones
                last edited by

                @PeterJones
                @mere-human

                Thank you for the gentle reminder about 'Feature Requests.

                [Feature Request] - exceeding ID_PLUGINS_CMD_LIMIT #10263 has been made

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