Bug 485159

Summary: Project ctags indexing can slow down kate shutdown / session switching
Product: [Applications] kate Reporter: Benjamin Currie <seegold123a>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: CONFIRMED ---    
Severity: wishlist CC: christoph, waqar.17a
Priority: NOR    
Version First Reported In: 24.02.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Benjamin Currie 2024-04-06 23:32:00 UTC
Kate does not crash, it just freezes for a dozen seconds or so. Viewing my system monitor a "ctags" process appears during the freeze and uses a lot of CPU. Then after the freeze it resumes as normal and the "ctags" process disappears.

STEPS TO REPRODUCE
1. Git clone a large C code base like the linux kernel
2. Save a session which involves being inside of the large project
3. Switch out the the session with "new session" or switch to another session within the "recent sessions" menu
4. Observe long freeze

Note it only seems to happen when switching out of the session, not when loading it in.

OBSERVED RESULT
A dozen second GUI freeze in Kate with the application turning grey for a bit

EXPECTED RESULT
No GUI freeze or at least some kind of loading bar to indicate something is happening.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 6.0.3 and Kate version 24.02.1
Comment 1 Waqar Ahmed 2024-04-07 17:03:22 UTC
Known issue.

An easier way to reproduce is to enable ctags support in project plugin, start Kate in a large project and then close it immediately. The shutdown of kate will take a long time.
Comment 2 Waqar Ahmed 2024-04-07 17:04:14 UTC
To fix this, we need to make the ctags process cancelable
Comment 3 Christoph Cullmann 2024-11-01 20:05:02 UTC
Would be a nice enhancement for any part of the project worker stuff. Patches welcome.