[code] [textadept] Find in Files performance

From: johannes <jodak932.att.gmail.com>
Date: Fri, 19 Oct 2018 13:36:47 +0200

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.

Thanks,
Johannes

-- 
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 Fri 19 Oct 2018 - 07:36:47 EDT

This archive was generated by hypermail 2.2.0 : Sat 20 Oct 2018 - 06:51:11 EDT