Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
High CPU usage while typing #830
Comments
|
Spellcheck enabled? |
shogoonn
commented
Nov 4, 2013
|
Spell checking is disabled. Turning it on and off doesn't make a difference. |
|
Does Task Manager report HC using more CPU time during that? Regarding the GTK version, we know what version it is since we build it ourselves (it's 2.24.19) |
shogoonn
commented
Nov 5, 2013
|
If you mean while switching the spell checker, then there is a small peak, but a very brief one. Turning the spell checker on adds about 0.05 s to CPU user time, turning off about adds ~0.08 s. One more thing I found: Holding down any of the modifier keys (shift, ctrl, alt) causes HC to fully occupy one of the CPU cores. Pressing down another modifier key does nothing (the CPU usage is still high), but when that key is released, the CPU load drops. If however the first key is released (while the second one is still being pressed), there's only a short drop of CPU load, and it backs up to full load once again. |
I meant when releasing a key, since that is when you said your CPU activity peeks in the OP.
Is the rest of your post starting from this line with spellcheck enabled? I cannot repro any of it without spellcheck. If so, can you see if you still repro with spellcheck disabled? |
shogoonn
commented
Nov 6, 2013
|
It happens with and without spell checking. |
|
@shogoonn the only performance issue I have ever seen is when spell check is used on massive words (100s of chars). That is the only reason I brought it up and is unrelated. |
I didn't say that. |
JOHW85
commented
Jan 22, 2014
|
I too have this problem. Spell check being enabled or not does not seem to remove the bug. |
shogoonn
commented
Jun 1, 2014
|
I've just got a new HexChat version (2.10.0 x64) and the issue is still there. @cktalon What hardware are you running HC on? |
JOHW85
commented
Jun 1, 2014
|
Intel i5 2500K@4.5Ghz |
shogoonn
commented
Jun 1, 2014
|
Maybe it is a race condition then, one that shows up only on some recent faster CPU's. |
jackpoz
commented
Jul 20, 2014
Lunatrius
commented
Aug 13, 2014
|
Happens when you hold down CTRL, ALT or SHIFT. |
jackpoz
commented
Aug 13, 2014
|
Visual Studio profiling using 8f9ed6d version. I was holding the CTRL key in the highlighted part and writing the alphabet before that Platform is Windows 8.1 Update 1 x64 on Intel i5 @ 3.70 GHz 4 threads , you can notice how it uses over 20% CPU so almost a whole core. Please remove the "unconfirmed" label to the issue. |
|
@jackpoz Since you know what you're doing, get the PDBs for the GTK bundle (ask tomek in #hexchat) and give us the callstack too. |
jackpoz
commented
Aug 13, 2014
|
You should definitely be able to get a list of callers going back all the way to hexchat code. That is what I meant by call stack. Also https://mail.gnome.org/archives/libsoup-list/2009-December/msg00010.html and misc google results for |
jackpoz
commented
Aug 13, 2014
|
here's the callstack going back from that poll_rest():
|
jackpoz
commented
Sep 7, 2014
|
can we at least get this issue "confirmed" instead of leaving it with "unconfirmed" label ? |
TingPing
added
upstream
win32
and removed
unconfirmed
labels
Sep 8, 2014
jackpoz
commented
Nov 16, 2014
|
this issue is now 1 year old, is there any plan about how to tackle it ? |
jackpoz
commented
Nov 26, 2014
|
Issue still happens using HexChat 2.10.2 x64 on Windows 8.1 |
Warpten
commented
Dec 7, 2014
|
Just a heads up, I'm not noticing any issue on Win7, Hexchat 2.9.5 32bits. Might be interesting to bisect |
tahg
commented
Mar 4, 2015
|
Cannot confirm either, Win7 Hexchat 2.10.1. Seems like an issue exclusive to one or more versions of Windows 8.x |
MadClown
commented
Apr 11, 2015
|
I can confirm that this issue is happening on my computer also. My CPU usage did indeed jump up quite a bit from typing like how it was described by the OP. Typically CPU usage was about 10-15% when typing quickly and only happened when keys got released. Holding a key down did not increase CPU usage. Windows 8.1 |
Warpten
commented
Apr 18, 2015
|
Upgraded to Win 8.1 x64, hexchat 2.10.2, successfully reproduced. |
LuqJensen
commented
Jul 30, 2015
|
Reproduced on win10 x64 using hechat 2.10.2 |
petska
commented
Aug 7, 2015
|
Do portable install use more CPU time than nonportable? |
jackpoz
commented
Aug 7, 2015
|
Any plan to update the dependencies in case they are the root cause (in particular GTK+) ? I provided detailed informations about where the CPU is wasting time 1 year ago in #830 (comment) and #830 (comment) but there has been no followup from either @Arnavion (who asked for the callstack) or anyone else. |
|
genbtc
commented
Sep 8, 2015
|
Reproduced on Hexchat 2.10.2 x64 on windows 10. (the hexchat about box says "Windows 8") |
|
@genbtc Read the comment directly before yours, especially the third point. |
jackpoz
commented
Sep 8, 2015
|
41% CPU usage pressing CTRL on "Nick name" using "HexChat 2.10.2 x86.exe" on WIndows 10 x64 with Intel i5 @ 3.70 GHz 4 threads Is there any hexchat developer who uses Windows x64 ? Quite disappointed that no developer tested it in 1 month after @Arnavion asked to try the 32 bits version |
|
It's unfortunate that the 32-bit version has the same issue.
Yes, but I use W7 which does not demonstrate this issue (as mentioned before in this thread). @tomek You're on 8.1? |
genbtc
commented
Sep 9, 2015
|
X86 version totally does it too: http://puu.sh/k5jGU/a7eac9d48f.png But my computer has all the "tablet" shit explicitly disabled on purpose, and this did not fix it. |
Windows 8 added spell checking and HexChat < 2.11.0 never made use of it. |
Mo0NTan
commented
Sep 10, 2015
Mo0NTan
commented
Sep 10, 2015
|
I forgot to add... You should wait like 5 minutes to really tell the difference after you disable it, I've also noticed if you disable Cortana along with the Runtime broker it is even better. but then Cortana kicks back in along with the Runtime broker in less then a minute, So for now i just keep the runtime broker disabled |
|
@Mo0NTan What version do you use? I already said "Windows 8 added spell checking and HexChat < 2.11.0 never made use of it.". Also does disabling it in Preferences > Input do nothing compared to this? |
genbtc
commented
Sep 10, 2015
|
@Mo0NTan Dude dont mess with runtimebroker...You disable it from PC Settings->Devices->Typing, and I checked on my system, closing runtimebroker did not help anything since I already had these off,, and I would never use Cortana .... : |
Mo0NTan
commented
Sep 10, 2015
|
oh, Thanks,That seems to work too, i did manage a hack to disable cortana, but that didn't significantly help at all, Seems the spellcheck does a bit. It goes to like 10 to 15% apposed to 30% and don't get stuck at 30. It could be video card driver related. I don't know? |
jackpoz
commented
Sep 10, 2015
|
The CPU usage issue affects only HexChat and not other applications like Notepad++, trying random things like killing Windows processes doesn't look much useful. |
Mo0NTan
commented
Sep 11, 2015
|
I wonder if an older version of hexchat regardless of the security holes wouldn't have this issue. I just realized how hot this is on my legs while on my laptop, |
jackpoz
commented
Nov 4, 2015
|
This issue is now 2 years old. In the meantime a new OS version came out (Windows 10) and still has the same issue. |
genbtc
commented
Nov 5, 2015
|
Can one of us unofficially modify GTK and provide a diff patch so that we can share it amongst ourselves in the meantime ? I would gladly recompile it as a second person to test. Unless someone starts the ball rolling, and at least proves that modifying GTK can fix the issue and that theres no other way to fix hexchat's code itself, then I doubt the GTK people will admit theres a problem on their end and just push the blame back saying its hexchat's fault... |
|
@genbtc We already ship a few patches that never made it upstream, so if somebody solves this that would be acceptable. |
You probably didn't restart VS to make it pick up the new value after you edited it.
You're building HC using GTK+openssl built by us. To make changes to GTK you will need to build GTK. |
jackpoz
commented
Jan 24, 2016
|
Did any developer update to Windows 10 in the meantime ? |
jackpoz
commented
Mar 15, 2016
|
Tested HexChat 2.12.0 on Windows 10 x64, still same issue. I saw some Windows 8 features in the changelog, am I to believe finally someone upgraded to Windows 8+ and can now work on this issue ? |
jackpoz
commented
Mar 31, 2016
|
Looking at the data I gathered 596 days ago #830 (comment) it could be that MsgWaitForMultipleObjectsEx() is called with a timeout too small. https://blogs.msdn.microsoft.com/oldnewthing/20151113-00/?p=92111 also suggests another possible case where MsgWaitForMultipleObjectsEx() returns with an error that is handled by calling again the same function over and over and over. Would any hexchat developer feel like working together to fix this issue by checking the 3 possible causes mentioned above ( or will they just stare at the issue ) ? Edit: continuing with blaming poor gpoll() implementation, https://lists.gnu.org/archive/html/qemu-devel/2014-05/msg01425.html and https://lists.gnu.org/archive/html/qemu-devel/2014-05/msg03572.html provide a patch to fix a "significant performance degradation of QEMU" |
Instead of waiting on us (which for gtk-win32 issues is basically just me), you can compile gtk-win32 yourself and test any patches you want. |
jackpoz
commented
Mar 31, 2016
|
HexChat build system is a nightmare, with custom Visual Studio build steps that don't support special characters or spaces and cryptic build errors. The repo layout HexChat chose scares away any developer who would attempt to build it (tried and gave up 3 times so far). https://github.com/hexchat/gtk-win32/blob/master/README.md doesn't provide any way to get a .sln with HexChat and all the dependencies so one can just F5 and debug into the application and all related dependencies. I profiled the issue, found a patch, opened a ticket to GTK+ https://bugzilla.gnome.org/show_bug.cgi?id=764415 and all you could write was "build it yourself". Going back to my question
the answer is clearly "No" |
jtanx
commented
Sep 17, 2016
|
Hello, I noticed this bug while searching on the internet. I experienced the same issue and I think I've found the problem. See here: https://bugzilla.gnome.org/show_bug.cgi?id=771568 The patch is to GDK. |
jackpoz
commented
Jun 30, 2017
|
Thanks for the heads up @jtanx and for the patch. |
|
@jackpoz Looks like they didn't backport that patch to Gtk2, I left a message so it will get into the next release. |
genbtc
commented
Jun 30, 2017
•
|
Please do
|









shogoonn commentedNov 4, 2013
HexChat 2.9.6.1 (build date: 2013-09-15, both x86 and x64 non-portable builds, clean install of x64 build and then x86 to see if it makes a difference).
OS: Windows 8.1 64-bit
The CPU is quad core i5-4570. When idle, the CPU runs at ~800MHz. Fast typing in a message box causes the frequency to rise up to ~3 GHz, and the CPU usage in this state is up to 20% (total of all cores). One of the cores is being loaded up to 80% (with some core switching). Slower typing causes less CPU load (on average). The power consumption rises from ~28W to more than 40W (I have a watt meter plugged in).
Sometimes the CPU load stays that high after I had finished typing, and drops back to normal only after I switch to another window.
No suspicious activity found with Sysinternals Process Monitor (disk writes, sockets, registry, etc.). No visible changes in memory usage while typing.
The CPU load is caused by a key release event. When I hold down a key, the CPU usage stays low until I release it. Releasing a key adds about 0.5 seconds to the "CPU user time" performance counter of the process.
I think it may have something to do with GTK+'s crappy keyboard handling. There's no information on the GTK+ version in Help->About window.