<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Faster &quot;Find in Files&quot;?]]></title><description><![CDATA[<p dir="auto">Any chance on multi-threaded “Find in Files” functionality? Is here any multi-threaded code in n++? Are there any plans for multi-threading? I am doing many such searches in couple thousands files and I am thinking about cutting wait time - it looks like I/O is a main bottleneck now so using couple of threads would speed it up.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/13646/faster-find-in-files</link><generator>RSS for Node</generator><lastBuildDate>Sat, 09 May 2026 19:49:27 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/13646.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 14 Apr 2017 17:16:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Faster &quot;Find in Files&quot;? on Tue, 09 May 2017 07:06:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/pnedev" aria-label="Profile: pnedev">@<bdi>pnedev</bdi></a>: this is what I started to do after analyzing the code - I have created hidden editview per each thread</p>
]]></description><link>https://community.notepad-plus-plus.org/post/24132</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/24132</guid><dc:creator><![CDATA[Krzysztof Chodak]]></dc:creator><pubDate>Tue, 09 May 2017 07:06:00 GMT</pubDate></item><item><title><![CDATA[Reply to Faster &quot;Find in Files&quot;? on Tue, 02 May 2017 14:21:40 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> ,</p>
<p dir="auto">If the file encoding is known and the multi-threaded search is implemented then yes, this will speed-up the process. But again, each thread will have to load a file to search into memory buffer.</p>
<p dir="auto">BR</p>
]]></description><link>https://community.notepad-plus-plus.org/post/24031</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/24031</guid><dc:creator><![CDATA[pnedev]]></dc:creator><pubDate>Tue, 02 May 2017 14:21:40 GMT</pubDate></item><item><title><![CDATA[Reply to Faster &quot;Find in Files&quot;? on Fri, 28 Apr 2017 20:18:24 GMT]]></title><description><![CDATA[<p dir="auto">Hi, <a class="plugin-mentions-user plugin-mentions-a" href="/user/pnedev" aria-label="Profile: pnedev">@<bdi>pnedev</bdi></a> and <a class="plugin-mentions-user plugin-mentions-a" href="/user/gstavi" aria-label="Profile: gstavi">@<bdi>gstavi</bdi></a>,</p>
<p dir="auto">Just an other <strong>newbe</strong> question !</p>
<p dir="auto">Would the <strong>Search in Files</strong> be <strong>quicker</strong> if the list of the <strong>scanned</strong> files contains, <strong>exclusively</strong>, files with a <strong><code>BOM</code></strong> ( cases <strong>UTF-8-BOM</strong>, <strong>UCS-2 BE BOM</strong> or <strong>UCS-2 LE BOM</strong> ) ?</p>
<p dir="auto">Indeed, with that <strong>BOM</strong>, the right <strong>encoding</strong> is quickly known, without any <strong>ambiguity</strong>, and should <strong>increase</strong> the search process !?</p>
<p dir="auto">Cheers,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23968</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23968</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Fri, 28 Apr 2017 20:18:24 GMT</pubDate></item><item><title><![CDATA[Reply to Faster &quot;Find in Files&quot;? on Fri, 28 Apr 2017 11:54:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/krzysztof-chodak" aria-label="Profile: Krzysztof-Chodak">@<bdi>Krzysztof-Chodak</bdi></a> ,</p>
<p dir="auto">As <a class="plugin-mentions-user plugin-mentions-a" href="/user/gstavi" aria-label="Profile: gstavi">@<bdi>gstavi</bdi></a> already described distributing will not work the way things are currently implemented in N++.<br />
The reason is because N++ uses hidden Scintilla view instance to perform the search. So each file in the search list will have to pass through this hidden Scintilla view which is serialization actually. Unless you change things entirely and have separate Scintilla view per thread multi-threading will be pointless but even with many Scintilla views those will again have to pass through N++'s main GUI thread window procedure. As <a class="plugin-mentions-user plugin-mentions-a" href="/user/gstavi" aria-label="Profile: gstavi">@<bdi>gstavi</bdi></a> said to be able to have multi-threaded search you’ll have to bypass Scintilla, load each file in memory and search that buffer but here comes the encoding detection problem and the proper reg-ex handling.</p>
<p dir="auto">BR,<br />
Pavel</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23957</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23957</guid><dc:creator><![CDATA[pnedev]]></dc:creator><pubDate>Fri, 28 Apr 2017 11:54:17 GMT</pubDate></item><item><title><![CDATA[Reply to Faster &quot;Find in Files&quot;? on Fri, 28 Apr 2017 10:56:03 GMT]]></title><description><![CDATA[<p dir="auto">I am downloading VS Community 2017  and I will see what I could do</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23956</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23956</guid><dc:creator><![CDATA[Krzysztof Chodak]]></dc:creator><pubDate>Fri, 28 Apr 2017 10:56:03 GMT</pubDate></item><item><title><![CDATA[Reply to Faster &quot;Find in Files&quot;? on Fri, 28 Apr 2017 07:26:47 GMT]]></title><description><![CDATA[<p dir="auto">I would just distribute “For each file in list” loop you mentioned across all CPU cores available with synchronization on find results; in theory it should cut the wait time by the number of cores available</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23955</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23955</guid><dc:creator><![CDATA[Krzysztof Chodak]]></dc:creator><pubDate>Fri, 28 Apr 2017 07:26:47 GMT</pubDate></item><item><title><![CDATA[Reply to Faster &quot;Find in Files&quot;? on Wed, 19 Apr 2017 06:44:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a><br />
GUI-wise anything goes.<br />
But the other benefit of current implementation that it actually reuse base functionality within Notepad++.<br />
As far as I remember, it is:</p>
<pre><code>Scan directories and build file list according to wildcards // This is another slow (and memory consuming) thing I forgot to mention
For each file in list
    Load file into Scintilla buffer // detect encoding, load entire file at once
    Find in Scintilla buffer and add to find results // Including all regular expression tricks
    Close Scintilla buffer
</code></pre>
<p dir="auto">So for faster find in files we will have to write a new algorithm entirely.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23686</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23686</guid><dc:creator><![CDATA[gstavi]]></dc:creator><pubDate>Wed, 19 Apr 2017 06:44:46 GMT</pubDate></item><item><title><![CDATA[Reply to Faster &quot;Find in Files&quot;? on Tue, 18 Apr 2017 19:54:19 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/gstavi" aria-label="Profile: gstavi">@<bdi>gstavi</bdi></a>,</p>
<p dir="auto">Thanks for your <strong>excellent</strong> explanation, on  the N++ <strong>moderate speed</strong> of searching, on <strong>multiple</strong> files. But, now, I’m simply wondering :</p>
<p dir="auto">Why don’t we add an <strong>other</strong> field, in the <strong>Find in Files</strong> dialog, which indicates the <strong>encoding</strong> ( <strong>ANSI</strong>, <strong>UTF-8</strong>, <strong>UCS-2 LE</strong> or <strong>UCS-2 BE</strong> ) of the different files <strong>scanned</strong> ?. Of course, if this zone would <strong>NOT</strong> be filled, the classical search, with encoding <strong>detection</strong>, would occurs ?</p>
<p dir="auto">However, it would be of the user’s <strong>responsibility</strong> to verify that <strong>no</strong> file, of the list to scan, has an <strong>other</strong> encoding that the one <strong>specified</strong>, as I suppose that the results, in the <strong>Search result</strong> panel, would, certainly, <strong>not</strong> be coherent, in that case !!</p>
<p dir="auto">Just an idea…</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
<p dir="auto"><strong>P.S.</strong> :</p>
<p dir="auto">If would be sensible to <strong>test</strong> this option in order to verify that speed increase is really <strong>significant</strong> !!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23665</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23665</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Tue, 18 Apr 2017 19:54:19 GMT</pubDate></item><item><title><![CDATA[Reply to Faster &quot;Find in Files&quot;? on Mon, 17 Apr 2017 21:54:16 GMT]]></title><description><![CDATA[<p dir="auto">In general multi threaded is not the ideal solution for “find in files” since it is mostly IO bound. Any thread added into a GUI application is an invitation for trouble. Asynchronous IO with single thread should usually provide results as good or better than multi threaded implementation.</p>
<p dir="auto">BUT this is not the problem of Notepad++.<br />
During “find in files” Notepad++ loads each file needlessly as if it would open it for viewing. The benefit is that during this load it detects file encoding, so you can “find in files” with multiple encodings. The price is that it is really really slow.</p>
<p dir="auto">An alternative “find in files” that assumes UTF-8 or is given a specific encoding in the dialog and scans the files with primitive buffer operations without actually load them into Scintilla will be MUCH faster.</p>
<p dir="auto">Personally I ‘grep’ things from command line, copy paste results and use tags lookup plugin to jump to file:line.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/23643</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/23643</guid><dc:creator><![CDATA[gstavi]]></dc:creator><pubDate>Mon, 17 Apr 2017 21:54:16 GMT</pubDate></item></channel></rss>