• Login
Community
  • Login

wrong plugin is blamed

Scheduled Pinned Locked Moved Notepad++ & Plugin Development
14 Posts 4 Posters 7.8k 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.
  • K
    Kasper Graversen
    last edited by Kasper Graversen Jun 19, 2016, 9:43 PM Jun 19, 2016, 9:42 PM

    Wrong plugin is reported during plugin crash. The FIRST plugin in the plugin folder is blamed

    anyone else seeing this?

    https://github.com/notepad-plus-plus/notepad-plus-plus/issues/1980

    It can explain why dspellcheck has a bad name - and I’ve never had it crashing.

    C 1 Reply Last reply Jun 20, 2016, 1:39 AM Reply Quote 0
    • C
      Claudia Frank @Kasper Graversen
      last edited by Jun 20, 2016, 1:39 AM

      Hello Kasper,

      good point - I can confirm this behavior. I got reported that compare plugin failed while
      mine threw an exception.

      Cheers
      Claudia

      1 Reply Last reply Reply Quote 0
      • K
        Kasper Graversen
        last edited by Jun 20, 2016, 8:43 PM

        @Claudia-Frank perhaps you should join the github discussion.

        what plugins are you maintaining?

        C 1 Reply Last reply Jun 20, 2016, 11:07 PM Reply Quote 0
        • C
          Claudia Frank @Kasper Graversen
          last edited by Jun 20, 2016, 11:07 PM

          @Kasper-Graversen

          I guess isn’t needed anymore as dail has already provided a patch .

          what plugins are you maintaining?

          Just some protocol decoders/converters for my companies application, nothing which npp community can benefit from.

          Cheers
          Claudia

          1 Reply Last reply Reply Quote 0
          • K
            Kasper Graversen
            last edited by Jun 21, 2016, 5:44 PM

            ok but you still know your way around n++/scintilla - so you must have done some rather complex stuff

            C 1 Reply Last reply Jun 21, 2016, 10:34 PM Reply Quote 0
            • C
              Claudia Frank @Kasper Graversen
              last edited by Jun 21, 2016, 10:34 PM

              @Kasper-Graversen

              Not as complex as you might think ;-)
              Protocol en/decoding and converting is, from my point of view,
              one of the simpler programming tasks as it is as strict as possible.
              Reading stream, do task, output stream.
              OK, with real time systems you need to be sure that your code
              is as efficient as possible but my task has mostly to do with testing,
              so I don’t care if it takes 20ns or 100ms if stream has been manipulated.

              Most of the things I know from npp/scintilla I got taught by the forum members.
              Lately, as I try to become a better c++ programmer, I was forced to read the npp
              source code to understand how it works but unfortunately the learning curve
              isn’t as steady as with other programming languages.

              Cheers
              Claudia

              1 Reply Last reply Reply Quote 0
              • K
                Kasper Graversen
                last edited by Jun 22, 2016, 12:54 PM

                @Claudia-Frank I just read parts of the code myself yesterday. N++ is doing textsearching rather in-efficiently. Really wanted to change the code but C++ and the code style is so far away from how I code (small classes, lots of unit tests)… perhaps I’ll post an issue on github with a link to a much better search algorithm (boyer moore https://en.wikipedia.org/wiki/Boyer–Moore_string_search_algorithm ) but raising issues is like fighting a pillow it seems.

                maybe @dail can work some magic here? ;)

                1 Reply Last reply Reply Quote 0
                • D
                  dail
                  last edited by Jun 22, 2016, 1:05 PM

                  I’ll agree the code is not the prettiest or easiest to maintain.

                  N++ is doing textsearching rather in-efficiently

                  What part are you meaning in particular? AFAIK it uses Scintilla to do the searching (and boost as well for regex stuff).

                  1 Reply Last reply Reply Quote 0
                  • K
                    Kasper Graversen
                    last edited by Kasper Graversen Jun 23, 2016, 9:24 AM Jun 23, 2016, 9:24 AM

                    @dail what about here https://github.com/notepad-plus-plus/notepad-plus-plus/blob/287ce9ec147d6d64224d8990f99385f57a240df4/scintilla/src/Document.cxx#L1682 it looks like a linear search - the algorithm link i sent the other day is much faster

                    1 Reply Last reply Reply Quote 0
                    • D
                      dail
                      last edited by Jun 23, 2016, 12:00 PM

                      That is part of Scintilla so any changes would have to go through the Scintilla project.

                      1 Reply Last reply Reply Quote 0
                      • K
                        Kasper Graversen
                        last edited by Jun 24, 2016, 3:07 PM

                        Ah sorry. Ill raise an issue there. Cool even faster searching in the future
                        :)

                        1 Reply Last reply Reply Quote 0
                        • V
                          Vitaliy Dovgan
                          last edited by Jun 24, 2016, 5:53 PM

                          Custom better search algorithms often have a potential problem connected to character representation. I mean, they operate with character tables to accelerate the search, but it’s not easy to create a proper character table for UTF-8 non-Latin text when 1 symbol can be represented by 2 or more bytes. So the developer should thoroughly weigh the pros and cons of an algorithm to be used.

                          1 Reply Last reply Reply Quote 0
                          • K
                            Kasper Graversen
                            last edited by Jun 24, 2016, 6:28 PM

                            @Vitaliy-Dovgan good point. But that as i see it would only make the jump table less inefficient. Also when you look at the charat() both in my link and on the Document class it is delegating to it seems to be operating on char.

                            1 Reply Last reply Reply Quote 0
                            • K
                              Kasper Graversen
                              last edited by Jun 24, 2016, 10:28 PM

                              @Vitaliy-Dovgan good point. But that as i see it would only make the jump table more inefficient. A full comparison i taking place on every potential match

                              Also when you look at the charat() both in my link and on the Document class it is delegating to it seems to be operating on char.

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