GNU nano - Bugs: bug #53562, high CPU usage with C syntax...
You are not allowed to post comments on this tracker with your current authentication level.
bug #53562: high CPU usage with C syntax highlighting when scrolling with the touchpad
Submitter: | easyaspi314 <easyaspi314> | ||
Submitted: | Wed 04 Apr 2018 08:14:08 PM UTC | ||
Severity: | 3 - Normal | Status: | Fixed |
Assigned to: | bens | Open/Closed: | Closed |
Jump to the original submission
Sat 28 Apr 2018 09:16:39 AM UTC, comment #24: |
Benno Schulenberg <bens> |
Tue 24 Apr 2018 08:12:09 AM UTC, comment #23: Thanks for confirming. The second patch has been pushed to master, commit 0d9080a2.
|
Benno Schulenberg <bens> |
Mon 23 Apr 2018 09:43:01 PM UTC, comment #22: Oh, sorry, I had this already typed out and I forgot to send it.
|
easyaspi314 <easyaspi314> |
Mon 23 Apr 2018 08:28:17 AM UTC, comment #21: Ping? Info on CPU usage for second patch? |
Benno Schulenberg <bens> |
Fri 20 Apr 2018 09:57:03 AM UTC, comment #20: What's the CPU usage with the second patch? Higher than with the first? Lower? Roughly equal? |
Benno Schulenberg <bens> |
Mon 16 Apr 2018 02:04:07 PM UTC, comment #19: rpl_wcwidth is how gnulib deals with overriding system functions, as C functions annoyingly need unique names.
|
easyaspi314 <easyaspi314> |
Mon 16 Apr 2018 08:41:43 AM UTC, comment #18: Strange... rpl_wcwidth()? But that function does not exist anywhere in glulib. At least, not in the modules that are included with nano. The function was renamed to plain wcwidth() eight years ago. Does your Mac somehow link against old gnulib modules that it has installed from the factory?
|
Benno Schulenberg <bens> |
Sun 15 Apr 2018 10:35:30 PM UTC, comment #17: I screwed up. That was for vanilla nano. I applied the patch and forgot to make clean.
|
easyaspi314 <easyaspi314> |
Sun 15 Apr 2018 06:43:01 PM UTC, comment #16: Yeah, I know images are hard for bots to interpret.
|
easyaspi314 <easyaspi314> |
Sun 15 Apr 2018 08:13:51 AM UTC, comment #15: Yes, I am supercautious -- you'll have to give me the info in words, not in a picture. for example, from where in nano is this function in gnulib that calls strlen() called? |
Benno Schulenberg <bens> |
Sat 14 Apr 2018 08:06:54 PM UTC, comment #14: Too bad, the PPM is not uploading. I guess the screenshot isn't important enough for you to open it.
|
easyaspi314 <easyaspi314> |
Sat 14 Apr 2018 07:49:27 PM UTC, comment #13:
|
easyaspi314 <easyaspi314> |
Sat 14 Apr 2018 05:53:49 PM UTC, comment #12: Apply to a clean 2.9.5. (It's an alternative patch -- when combined with the other patch, it would do the wrong thing.)
|
Benno Schulenberg <bens> |
Sat 14 Apr 2018 05:06:48 PM UTC, comment #11: Do you want me to apply this patch to clean 2.9.5 or on top of your other patch?
|
easyaspi314 <easyaspi314> |
Sat 14 Apr 2018 10:56:51 AM UTC, comment #10: Thanks for confirming that the patch reduces the CPU usage to acceptable levels -- and presumably gets rid of the perceived lag.
|
Benno Schulenberg <bens> |
Fri 13 Apr 2018 11:14:06 PM UTC, comment #9: The patch did in fact reduce CPU to about 12-20%. Good find.
|
easyaspi314 <easyaspi314> |
Fri 13 Apr 2018 11:46:41 AM UTC, comment #8: Oh, wow... Indeed, just cofiguring with --disable-utf8, makes scrolling in doc/faq.html usable (nearly fully smooth). Apparently the UTF-8 routines eat a lot of cycles. :|
|
Benno Schulenberg <bens> |
Thu 12 Apr 2018 11:20:34 AM UTC, comment #7: I quickly scanned the patch and it looks good.I am not at my laptop right now, but I will test it when I get a chance.
|
easyaspi314 <easyaspi314> |
Thu 12 Apr 2018 09:38:02 AM UTC, comment #6: Attached is an improved version of the patch that also works when using --softwrap. Especially when using --softwrap (for example on doc/faq.html), the lag (without the patch) is noticeable. |
Benno Schulenberg <bens> |
Thu 12 Apr 2018 07:56:58 AM UTC, comment #5: I've thought about this again and... it's not that any keystroke could come in at rocket speeds, it's just the <Up> and <Down> keys. So, maybe nano could handle those two cases in a special way. Attached patch does that. If you can, please test and report back whether this gets rid of the perceived lag.
|
Benno Schulenberg <bens> |
Thu 05 Apr 2018 05:51:22 PM UTC, comment #4: 2) Ah, okay, now I see what you mean. With a 48x164 terminal, and using two-finger scrolling, I can notice a lag (especially when reaching comvert_sequence()). But... this is to be expected: using two fingers on the touchpad to scroll is like pressing the <Up> or <Down> key very fast. Nano can cope with normal and also quite fast typing speeds, but not with superhuman rocket streams of keystrokes. If a user wants to "scroll" quickly through a file, they should use <PageDown>/<PageUp> -- nano is a terminal program, not a graphical one.
|
Benno Schulenberg <bens> |
Thu 05 Apr 2018 03:31:05 PM UTC, comment #3: By the way, he regex application was what I meant by syntax tree. Too much time messing with Clang plugins, I guess. :-/ |
easyaspi314 <easyaspi314> |
Thu 05 Apr 2018 03:24:14 PM UTC, comment #2: 1. It looks like Nano hogs the CPU and makes it so the terminal can't keep up with the redrawing. Because iTerm2 never lags except for when scrolling in Nano. I believe that Terminal.app is single threaded.
|
easyaspi314 <easyaspi314> |
Thu 05 Apr 2018 10:48:51 AM UTC, comment #1: Several questions.
|
Benno Schulenberg <bens> |
Wed 04 Apr 2018 08:14:08 PM UTC, original submission:
The bug
Steps to reproduce
What happens
System Info
|
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 16 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2018-04-28 | bens | Open/Closed | Open | Closed | |
2018-04-24 | bens | Status | Need Info | Fixed | |
2018-04-16 | bens | Attached File | - | Added 0001-scrolling-don-t-redraw-entire-edit-window-when-curso.patch, #43947 | |
2018-04-15 | bens | Status | Ready For Test | Need Info | |
2018-04-14 | easyaspi314 | Attached File | - | Added Screen Shot 2018-04-14 at 1.00.52 PM.png, #43928 | |
2018-04-14 | bens | Attached File | - | Added 0001-scrolling-don-t-redraw-entire-edit-window-when-curso.patch, #43926 | |
2018-04-13 | bens | Severity | 2 - Minor | 3 - Normal | |
Assigned to | None | bens | |||
2018-04-12 | bens | Attached File | - | Added 0001-moving-handle-consecutive-Up-s-and-Down-s-without-up.patch, #43891 | |
2018-04-12 | bens | Attached File | - | Added 0001-moving-handle-consecutive-Up-s-and-Down-s-without-up.patch, #43890 | |
Status | Need Info | Ready For Test | |||
2018-04-05 | bens | Severity | 3 - Normal | 2 - Minor | |
Summary | high CPU usage with C syntax highlighting when scrolling | high CPU usage with C syntax highlighting when scrolling with the touchpad | |||
2018-04-05 | bens | Status | None | Need Info | |
Summary | Very high CPU usage with syntax highlighting + scrolling | high CPU usage with C syntax highlighting when scrolling | |||
2018-04-04 | easyaspi314 | Attached File | - | Added c.vim, #43800 |
Powered by Savane 3.13-f8d8.
Corresponding source code
The improvement has been released in 2.9.6. Thanks again for reporting.