Community
    • Login
    1. Home
    2. Popular
    Log in to post
    • All Time
    • Day
    • Week
    • Month
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics

    • All categories
    • CoisesC

      Search++: A work in progress

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      119
      5 Votes
      119 Posts
      35k Views
      CoisesC
      @guy038 said: I’m actually really surprised by Search++'s performance compared to Notepad++, especially when the search involves a complex regular expression. ( 0:16.36 vs 2:08.20 ! ) Please, note that the USB flash drive I used for my test is a fairly old one with a capacity of only 512 Mb, which may not be well-suited for multithreading and would explain the poor results with Search++ In any case, I assume you’re now confident in Search++'s overall performance ! I don’t entirely trust my own results. Why did my USB search in Search++ for the take longer than the search for a([^\r\n])[^\r\n]*b\1? Either the test data is erroneous or spurious, or Search++ is screwing up access to the USB in some way that’s causing it to “choke” and lose performance (what I suspect happened in your test). I’m still trying to work out how to avoid that happening without hurting the performance when reads are fast. To the best of my knowledge, Notepad++ is entirely single-threaded. It’s only ever doing one thing at a time. An i9-9900K can run sixteen threads simultaneously. So for CPU-heavy workloads (complicated regex searches) with lots of files, it’s not at all surprising that a multithreaded approach could be almost eight times faster. Thirteen times faster running a([^\r\n])[^\r\n]*b\1 against an SSD is pretty satisfying, though. :-) I’m probably getting additional gains from using memory-mapped I/O and running Boost::regex directly against the data the operating system maps into memory, while Notepad++ loads every file into a buffer, and from there into an off-screen Scintilla, before running the search through Scintilla’s API instead of directly with Boost::regex. It’s useful to have tests like yours. I won’t be able to test anywhere near all the situations that can occur. What happens when someone searches a OneDrive folder and not all the files are up-to-date? What happens when someone searches a drive that’s mounted over a VPN? What happens when the cat knocks the USB connector loose in the middle of a search? The worst case for all these is that the whole thing either crashes and takes Notepad++ down with it, or locks up and makes the user terminate Notepad++ with task manager — losing any unsaved work in progress. I don’t want to let that happen. I still have a lot to do to “harden” this against things that can go wrong. And that’s not even starting with Replace yet.
    • M

      macro question re:

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      6
      1
      0 Votes
      6 Posts
      146 Views
      Troglo37T
      @guy038 I’m sorry, but I’m totally confused by what I’ve seen so far. Can you or anyone make one post step by step, everything from the beginning to the end of what needs to be done? It would be extremely helpful for me and others who aren’t programmer-savvy.
    • BB

      Search accented and non-accented characters alike with one simple setting?

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      9
      0 Votes
      9 Posts
      1k Views
      dr ramaanandD
      @guy038 has given a good example here also: https://community.notepad-plus-plus.org/topic/27611/is-there-a-way-to-find-both-alphabets-with-and-without-accents-at-the-same-time-when-searching