GNU nano - Bugs: bug #62442, update_softwrapped_line() takes...
You are not allowed to post comments on this tracker with your current authentication level.
bug #62442: update_softwrapped_line() takes quadratic time
Submitter: | easyaspi314 <easyaspi314> | ||
Submitted: | Wed 11 May 2022 03:58:59 PM UTC | ||
Severity: | 3 - Normal | Status: | Fixed |
Assigned to: | bens | Open/Closed: | Closed |
Jump to the original submission
Wed 20 Jul 2022 12:25:13 PM UTC, comment #12: |
Benno Schulenberg <bens>![]() ![]() |
Sun 17 Jul 2022 07:22:02 AM UTC, comment #11: Hi Devin,
|
Benno Schulenberg <bens>![]() ![]() |
Sun 22 May 2022 09:21:24 AM UTC, comment #10: What I don't understand is: why does mvwchgat() need both the attributes and the pairnum while the three-function dance uses just the attributes. But if this reduction in number of function calls actually improves things -- and mvwchgat() does not call wattron() and mvwin() and wattroff() and such internally) -- then please provide a patch that makes the relevant changes. |
Benno Schulenberg <bens>![]() ![]() |
Sun 15 May 2022 06:26:39 AM UTC, comment #9: I mentioned this a few times. Basically the primary problem with regex is that it is done inside the loop instead of outside.
|
easyaspi314 <easyaspi314> |
Fri 13 May 2022 03:31:44 PM UTC, comment #8: Yes, there is still a LOT of quadratic behavior to fix, namely in regex and all the actual_x/wideness/xplustabs calls. It is going to take a lot of work, especially with regex which would need a whole restructure. |
easyaspi314 <easyaspi314> |
Fri 13 May 2022 03:26:03 PM UTC, comment #7: Thanks. After some quick tests, things seem to work fine. With --atblanks, lines are softwrapped correctly at blanks. <End> <End> goes first to the end of the row, and then to the end of the real line. And spotlight_softwrapped() correctly spotlights things, also when crossing a softwrap boundary.
|
Benno Schulenberg <bens>![]() ![]() |
Thu 12 May 2022 05:38:43 PM UTC, comment #6: New patch is up, with the function name now changed to next_softwrap_breakpoint, reverting the function with the original behavior to the old name.
|
easyaspi314 <easyaspi314> |
Thu 12 May 2022 04:03:54 PM UTC, comment #5: Savannah really needs an edit feature :(
|
easyaspi314 <easyaspi314> |
Thu 12 May 2022 03:32:37 PM UTC, comment #4: Correction: update_softwrapped_line -- reading is hard. |
Benno Schulenberg <bens>![]() ![]() |
Thu 12 May 2022 03:31:20 PM UTC, comment #3: It is far from pretty. :) One improvement would be is to rename the new get_softwrap_breakpoint() function, because you change its parameters anyway, so that the wrapper function can keep the old name, so that the calls that do not need optimization do not need to be changed. It makes the patch smaller.
|
Benno Schulenberg <bens>![]() ![]() |
Thu 12 May 2022 05:04:53 AM UTC, comment #2: I created a patch, which I believe to still be a work-in-progress. It isn't the prettiest solution by any means.
|
easyaspi314 <easyaspi314> |
Wed 11 May 2022 05:07:10 PM UTC, comment #1: Argh. I'm sorry, I got the function names mixed up.
|
easyaspi314 <easyaspi314> |
Wed 11 May 2022 03:58:59 PM UTC, original submission:
Not exactly sure how to fix this, as the math is really weird.
|
easyaspi314 <easyaspi314> |
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 11 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2022-08-03 | bens | Open/Closed | Open | ![]() |
Closed |
2022-07-20 | bens | Status | Ready For Test | ![]() |
Fixed |
2022-07-17 | bens | Attached File | - | ![]() |
Added 0001-display-remember-text-and-column-positions-when-soft.patch, #53447 |
Status | None | ![]() |
Ready For Test | ||
Assigned to | None | ![]() |
bens | ||
2022-05-12 | easyaspi314 | Attached File | - | ![]() |
Added 0001-Reduce-quadratic-loops-in-softwrap-code.patch, #53192 |
2022-05-12 | bens | Summary | update_softwrap_line() takes quadratic time | ![]() |
update_softwrapped_line() takes quadratic time |
2022-05-12 | bens | Summary | update_softwrap_breakpoint loops are quadratic | ![]() |
update_softwrap_line() takes quadratic time |
2022-05-12 | easyaspi314 | Attached File | - | ![]() |
Added 0001-WIP-Reduce-redundant-string-scanning-in-softwrap.patch, #53188 |
2022-05-11 | easyaspi314 | Attached File | - | ![]() |
Added gprof.txt, #53186 |
Attached File | - | ![]() |
Added output.png, #53187 |
Patch (file #53192) has been applied to master, commit 0e9bef34. This fixes the main actionable part of this issue. If there are other parts you want to have addressed, please file a new issue.