Sublime Text Syntax Definition Rewrite

Dmitry dmitry at indiedev.ru
Thu Feb 28 11:15:05 UTC 2019


On Thursday, 28 February 2019 at 06:54:32 UTC, Benjamin Schaaf 
wrote:
> I know you're just taking a fun jab but from personal 
> experience its behaved pretty well with multi-GB files. All the 
> corner cases we're aware of where it does become slow are 
> algorithmic problems where a change in language really wouldn't 
> help :)
I was kidding, but not for 100%.

If I open 3-10 GB file (log) and then try to find something, it's 
almost unusable. For example, I pressed Ctrl+F and entered first 
char. After it, Sublime may become frozen for (just for example, 
it depends) 40 seconds. Then second char — same. Etc. So, just to 
open file and find first required record (like '2019-02-28, 
08:05:') may take 5 minutes (and again, it depends). As I 
understand, it's because Sublime tries to find and highlight all 
same sequences. Any old editor (without such highlighting) works 
faster.

Tried just now. File 6.1 GB. I pressed Ctrl+F and it showed 
search panel in 26 seconds. I entered '2'. Took 33 seconds. Then 
second char — '0', 27 seconds. '1' — about 26 seconds. '9' - 26 
seconds. So, just to find first '2019' took about 140 seconds.
Would be better if it instantly find first record and then 'in 
background' search all other records.

Another example. File 1.5GB. Notepad++ opens it about 8-9 
seconds, Sublime opens it about 29-30 seconds. Tried to find 
'2019', and it took less than a second in N++. Tried to find 
another record (placed almost of the end of the file). Sublime 
took about 40 seconds, N++ about 10 seconds.

For example, my usercase was like:
1. Open file
2. Find first record of required date
3. Delete all records before
4. Find last record of required date
5. Delete all records after
6. Make actions (usually with 'Filter Lines' plugin, etc).
and such things took a lot of time.

P.S. 32GB RAM, i9-9900K, GTX1080, Windows 10
P.P.S. Also there are some problems when opened many tabs (6-7 
windows, 100+ tabs). Then I can't drag the window to second 
display. It changes size to minimal possible and I can't catch it 
(there are only sublime icon + window's icons)
P.P.P.S. Sublime is my main/favourite editor and I use both 2 and 
3 verisons at the same time (3 is a lot faster than 2).


More information about the Digitalmars-d-announce mailing list