Community
    • Login

    wrong plugin is blamed

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    14 Posts 4 Posters 7.6k 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.
    • Kasper GraversenK
      Kasper Graversen
      last edited by Kasper Graversen

      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.

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC
        Claudia Frank @Kasper Graversen
        last edited by

        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
        • Kasper GraversenK
          Kasper Graversen
          last edited by

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

          what plugins are you maintaining?

          Claudia FrankC 1 Reply Last reply Reply Quote 0
          • Claudia FrankC
            Claudia Frank @Kasper Graversen
            last edited by

            @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
            • Kasper GraversenK
              Kasper Graversen
              last edited by

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

              Claudia FrankC 1 Reply Last reply Reply Quote 0
              • Claudia FrankC
                Claudia Frank @Kasper Graversen
                last edited by

                @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
                • Kasper GraversenK
                  Kasper Graversen
                  last edited by

                  @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
                  • dailD
                    dail
                    last edited by

                    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
                    • Kasper GraversenK
                      Kasper Graversen
                      last edited by Kasper Graversen

                      @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
                      • dailD
                        dail
                        last edited by

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

                        1 Reply Last reply Reply Quote 0
                        • Kasper GraversenK
                          Kasper Graversen
                          last edited by

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

                          1 Reply Last reply Reply Quote 0
                          • Vitaliy DovganV
                            Vitaliy Dovgan
                            last edited by

                            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
                            • Kasper GraversenK
                              Kasper Graversen
                              last edited by

                              @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
                              • Kasper GraversenK
                                Kasper Graversen
                                last edited by

                                @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
                                • First post
                                  Last post
                                The Community of users of the Notepad++ text editor.
                                Powered by NodeBB | Contributors