GNU nano - Bugs: bug #59945, the handling of multiline regexes...
You are not allowed to post comments on this tracker with your current authentication level.
bug #59945: the handling of multiline regexes is too slow
Submitter: | Benno Schulenberg <bens> | ||
Submitted: | Tue 26 Jan 2021 10:52:09 AM UTC | ||
Severity: | 2 - Minor | Status: | Fixed |
Assigned to: | bens | Open/Closed: | Closed |
Wed 27 Jan 2021 04:21:21 PM UTC, comment #2: |
Benno Schulenberg <bens> |
Tue 26 Jan 2021 06:37:53 PM UTC, comment #1: In current git, uncomment the #define TIMEREFRESH line in src/winio.c, recompile and then run:
See that this first "refresh" takes less than 3 ms. Page down and up a bit. See that the refresh times vary considerably, but are mostly in the range of 5 to 10 ms. Type M-/ to go to end-of-buffer, and page up and down a bit. See that the refresh times are roughly in the same range.
|
Benno Schulenberg <bens> |
Tue 26 Jan 2021 10:52:09 AM UTC, original submission:
To reproduce, run:
Now slowly type three single quotes: ' ' '.
|
Benno Schulenberg <bens> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 4 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2021-02-25 | bens | Open/Closed | Open | Closed | |
2021-01-27 | bens | Severity | 3 - Normal | 2 - Minor | |
Status | None | Fixed | |||
2021-01-26 | bens | Assigned to | None | bens |
Powered by Savane 3.13-d3ae.
Corresponding source code
Fixed in git, commit 43d94692, by searching for an end match only for the first row of the screen.
With this change, typing the third single quote at the top of the buffer now takes around 37 ms (instead of around 1000 ms). But... after jumping to the end of the buffer, and then paging around there now takes around 70 ms (instead of around 8 ms before).
Seventy milliseconds is too much, but... applying a Python syntax to the NEWS file is really a misuse, a pathological case. Paging around near the tail of a real 2000-line Python file now takes around 20 ms per refresh, instead around 8 ms before the commit. That is an acceptable time.