GNU nano - Bugs: bug #56433, [Task] nano should store each...
You are not allowed to post comments on this tracker with your current authentication level.
bug #56433: [Task] nano should store each compiled file-matching regex
Submitter: | Benno Schulenberg <bens> | ||
Submitted: | Mon 03 Jun 2019 02:53:06 PM UTC | ||
Severity: | 1 - Wish | Status: | Fixed |
Assigned to: | bens | Open/Closed: | Closed |
Sat 24 Apr 2021 09:51:12 AM UTC, comment #4: |
Benno Schulenberg <bens> |
Wed 14 Apr 2021 10:48:07 AM UTC, comment #3: Well... when doing the comparison again (each over twenty runs) when opening just one small file (which is how most users will use nano), then memory usage is increased from 3600 to 3880 kB on average, and startup time reduced from 8.4 to 7.8 ms on average. That's an eight percent increase in memory usage against a seven percent reduction in startup time. That's not a clear-cut situation. :| |
Benno Schulenberg <bens> |
Tue 16 Mar 2021 04:27:58 PM UTC, comment #2: When opening two files (the NEWS file plus a small file in which I store the memory usage -- running an automated '^T grep VmHWM /proc/$(pidof nano)/status' in that buffer and using --saveonexit), then storing all file-matching regexes (for all standard syntaxes) increases memory usage from roughly 4100 kB to 4200 kB, and reduces startup time from a minimum of 11.3 ms to a minimum of 9.7 ms.
|
Benno Schulenberg <bens> |
Wed 19 Jun 2019 06:38:28 AM UTC, comment #1: Brand posted a patch for this (file #47023) on bug #56432, but does not wish to see it applied, as it increases memory usage by some twelve percent (on his system). If I remember well, this was one reason why I decided to discard the storing of these compiled regexes a long while ago. |
Benno Schulenberg <bens> |
Mon 03 Jun 2019 02:53:06 PM UTC, original submission:
In grab_and_store(), each filename and headerline and magic regex is compiled to check its validity, but the result is discarded, which means that, when trying to match a file to a syntax, all these regexes have to be compiled again (until a match is found), again and again when opening multiple files. This is a waste of time. Better use some more mmemry and go faster. |
Benno Schulenberg <bens> |
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-04-27 | bens | Open/Closed | Open | Closed | |
2021-04-24 | bens | Status | None | Fixed | |
2021-03-16 | bens | Attached File | - | Added save-regexes.patch, #51075 | |
2021-01-21 | bens | Assigned to | None | bens |
Powered by Savane 3.13-4448.
Corresponding source code
Addressed in git, commit c96e62e3.