Bug 443885

Summary: Konsole is very slow to output text to screen
Product: [Applications] konsole Reporter: Waqar Ahmed <waqar.17a>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED FIXED    
Severity: normal CC: a.samirh78, nate
Priority: NOR    
Version: master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Waqar Ahmed 2021-10-17 12:53:27 UTC
SUMMARY

Konsole is super slow to output a lot of text to screen. This output can be from any app for e.g., cat or debug output etc.


STEPS TO REPRODUCE
1. Open Konsole and type "cat some_big_file"
2. Notice that konsole takes a lot of time

Also, I must note here that this isn't just some non-practical problem. "cat xyz" is just an example. I face this issue while working on an app which spews a lot of text to the screen when starting up and due to this slowness it is very slow to launch and test the app every time. Doing some profiling shows that 90% of the time is being spent in just (de)allocations.


KDE Frameworks Version: master
Qt Version: 5.15.2
Comment 1 Ahmad Samir 2021-10-17 13:08:57 UTC
Try disabling "Reflow lines" (profile settings -> scrolling).
Comment 2 Waqar Ahmed 2021-10-17 17:37:09 UTC
@Ahmad Samir,  That seems to have no affect at all.
Comment 3 Bug Janitor Service 2021-10-17 17:51:14 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/konsole/-/merge_requests/505
Comment 4 tcanabrava 2021-11-15 13:49:11 UTC
Git commit d8999631d96d03de6e4907e9463160e890f7dba5 by Tomaz  Canabrava, on behalf of Waqar Ahmed.
Committed on 15/11/2021 at 13:46.
Pushed by tcanabrava into branch 'master'.

Improve performance of outputting text to screen

This change tries to improve the performance when you are outputting a
lot of text to the screen. Result with a 40M text file for me before was
6 seconds which is now down to about 3.5 seconds with this change.

It can still be improved a lot more.

M  +1    -1    src/Screen.cpp
M  +20   -23   src/history/compact/CompactHistoryScroll.cpp
M  +6    -5    src/history/compact/CompactHistoryScroll.h

https://invent.kde.org/utilities/konsole/commit/d8999631d96d03de6e4907e9463160e890f7dba5