Re: [code] [textadept] Find in Files performance

From: Mitchell <m.att.foicica.com>
Date: Sat, 20 Oct 2018 14:33:39 -0400 (EDT)

Hi Johannes,

On Fri, 19 Oct 2018, johannes wrote:

> Hi Mitchell,
>
> the performance of the 'find_in_files' function isn't the best. As I think,
> thats because the find mechanism is mainly taken from Scintilla, via
> SCI_SEARCHINTARGET. For this the filecontent must be loaded every time inside
> a temporary buffer and then SCI_TARGETWOHLEDOCUMENT is called, which makes
> the whole process slow (correct me if I'm wrong). Do you think there is a
> possibility to speed it up via the existing scintilla toolchain? Haven't seen
> one so far.
> In comparisson, other editors perform magnitudes faster at in-files
> searching. But they all use external regex engines, or call other processes
> like GNU grep for this task.
> A list with lots of regex engines and their use in texteditors can be found
> here:
> https://en.wikipedia.org/wiki/Comparison_of_regular_expression_engines
> Do you think it would be theoretically possible to include some external
> regex library and then refactor 'find_in_files' a little? Or maybe it would
> be good enough to implement a function which uses the regex library of the
> C++11 standard library.
> For other tasks in my module I could use better regex search as well.

I am open to suggestions. I don't know of a way to speed up "find in files" via the existing Scintilla toolchain. Perhaps the only effective way is to call upon an external tool, as most editors do. For the longest time I've just been using 'ack', but recently I've been forcing myself to use Textadept's built-in feature with some specially crafted filters. It's fast enough for me, even with large projects.

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Sat 20 Oct 2018 - 14:33:39 EDT

This archive was generated by hypermail 2.2.0 : Sun 21 Oct 2018 - 06:52:03 EDT