Bug 504590 - sorting ctags should limit memory usage
Summary: sorting ctags should limit memory usage
Status: REPORTED
Alias: None
Product: kate
Classification: Applications
Component: general (other bugs)
Version First Reported In: 23.08.5
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-21 01:53 UTC by Aaron Williams
Modified: 2025-05-21 07:33 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron Williams 2025-05-21 01:53:40 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports

Please remove this comment after reading and before submitting - thanks!
***

SUMMARY
I have many large projects I work on, such as the Linux kernel. Unfortunately, if I do something like a large git update, each instance of Kate will spawn a process to sort the ctags, and this takes an enormous amount of memory, bringing my workstation to a crawl. My workstation has 128GiB of RAM and 32 cores, so it's quite powerful. When calling sort it should limit how much memory it uses.  On Linux, this can be done using the -S option.  In addition, it would be nice if it could also use parallelism.

STEPS TO REPRODUCE
1. Have one or more large projects open
2.  Perform an operation, i.e., git, that updates a lot of files
3. Watch computer slow to a crawl as it pages like crazy

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: 
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
I'm not sure if Kate is the right place to put this. I mostly use KDevelop, which uses Kate underneath.
Comment 1 Kåre Särs 2025-05-21 07:33:03 UTC
Thanks for the report!

The ctags support is very much on the back burner. All  Kate developers (that I know of), have started using LSP and clangd in stead. LSP  brings a lot of nice features.

Since you have the Linux kernel there, it sounds like you might be capable of scratching your itch and provide a patch to fix your problem :)

Patches are very welcome!