Bug 468259 - High CPU usage during intensive scrolling
Summary: High CPU usage during intensive scrolling
Status: NEEDSINFO WAITINGFORINFO
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 22.12.3
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-07 20:39 UTC by Yaroslav
Modified: 2024-12-20 03:46 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yaroslav 2023-04-07 20:39:13 UTC
SUMMARY
***
scrolling a lot of text incurs large performance overhead. konsole is consuming up to 65% of a single core if I'm doing, f.e. , `tail` -f of a quickly updating log file
***


STEPS TO REPRODUCE
1. induce scrolling . easiest way is to run 'while [ 1 ] ; do echo 'testtesttesttesttest' ; done 
2. open `top` or run another performance monitor 

OBSERVED RESULT
high cpu usage, over 50% of a single core

EXPECTED RESULT
negligible cpu usage, as with other terminal emulation software

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version: kde-frameworks/plasma-5.104.0:5/5.104
KDE Frameworks Version: 5.104
Qt Version: 5.15.8

ADDITIONAL INFORMATION
I have tested this with both Gentoo packages built from source by myself  , and precompiled Arch linux packages. 
During investigation I've compiled konsole and QtGui with debugging symbols, and ran `perf record` + `perf report` dwhile reproducing the issue. The culprit seems to be incorrect or excessive usage of alphargbblend_argb32
     37.13%     0.00%  konsole         libQt5Gui.so.5.15.8             [.] QtSharedPointer::ExternalRefCountWithCustomDeleter<QColorTrcLut, QtSharedPointer::NormalDeleter>::deleter
            |
            ---QtSharedPointer::ExternalRefCountWithCustomDeleter<QColorTrcLut, QtSharedPointer::NormalDeleter>::deleter
               0x5645ea71a9c0
               |          
               |--31.87%--alphargbblend_argb32
               |          
                --5.26%--qt_alphargbblit_argb32
Comment 1 Yaroslav 2023-04-07 20:46:48 UTC
I can repro the same issue with qterminal , but with smaller performance hit (CPU usage hovers in 20% to 50%, which is still too much compared with VTE-based terminals). Highest CPU consumer is the same (alphargbblend_argb32 )
Comment 2 Christoph Cullmann 2024-12-05 22:53:31 UTC
Please re-try that with 24.08 or later. Thanks!
Comment 3 Bug Janitor Service 2024-12-20 03:46:56 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!