Summary: | Switching to Vi input mode causes a CPU usage spike | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | V C <venkatcc> |
Component: | Vi Input Mode | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | kdedevel, martin.sandsmark, mikisabate, simonandric5 |
Priority: | NOR | ||
Version: | 16.08 | ||
Target Milestone: | --- | ||
Platform: | Microsoft Windows | ||
OS: | Microsoft Windows | ||
Latest Commit: | https://commits.kde.org/ktexteditor/86f75f4f384ad9e0308c817dc4e3cbda176c2f9b | Version Fixed In: |
Description
V C
2017-02-15 06:06:34 UTC
@vi mode developers: maybe you can have a look? seems like a busyloop in emulatedcommandbar, according to `perf top` and gdb. what is this code supposed to do, why is it looping?: https://github.com/KDE/ktexteditor/blob/master/src/vimode/emulatedcommandbar/emulatedcommandbar.cpp#L135-L137 ::hasPendingEvents() is obsolete, so it has probably changed to just return true all the time or something. Git commit 86f75f4f384ad9e0308c817dc4e3cbda176c2f9b by Martin T. H. Sandsmark. Committed on 01/07/2017 at 16:37. Pushed by sandsmark into branch 'master'. Fix cpu usage spiking after showing vi command bar With Qt 5.9 (at least), QCoreApplication::hasPendingEvents() (which is already marked as obsolete) seems to unconditionally return true, at least here. The looping didn't make sense at all anyways. REVIEW: 130168 M +1 -3 src/vimode/emulatedcommandbar/emulatedcommandbar.cpp https://commits.kde.org/ktexteditor/86f75f4f384ad9e0308c817dc4e3cbda176c2f9b Thanks Martin! Any idea when the next release might be with this fix? Best regards! |