Bug 478502 - project plugin is slowing down kate start
Summary: project plugin is slowing down kate start
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: application (other bugs)
Version First Reported In: 22.04.1
Platform: RedHat Enterprise Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-14 07:52 UTC by Gerhard S.
Modified: 2023-12-18 18:51 UTC (History)
2 users (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 Gerhard S. 2023-12-14 07:52:04 UTC
SUMMARY
***
When launching kate, it takes "forever" before the GUI comes up.
***


STEPS TO REPRODUCE
Unfortunately, I don't know what to do.

OBSERVED RESULT
When launching kate, it takes "forever" before the GUI comes up. When I do an strace, I can see that kate is opening every file in a directory with lots of them, probably the last directory in use. Sometimes it's doing a git ls-remote, causing the git server to overload if everyone starts multiple kates in directories with lots of files.

EXPECTED RESULT
quick start of an empty kate, no matter how many files there are in some directories that are not currently in use.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: RHEL 8.8
(available in About System)
KDE Plasma Version: plasma-desktop-5.24.7-1.el8.x86_64 from the EPEL repository
KDE Frameworks Version: ?
Qt Version: qt5-qtbase-5.15.3-1.el8.x86_64

ADDITIONAL INFORMATION
It seems to be caused by the project plugin, this helps:
sed -i s/kateprojectplugin=true/kateprojectplugin=false/ \ /home/$LOGNAME/.local/share/kate/anonymous.katesession
Unfortunately, this is user-specific, so everyone would have to do that. How do I properly disable the project plugin for everyone?
Comment 1 Waqar Ahmed 2023-12-14 08:40:50 UTC
I think what you are seeing is a side effect of "Restore Open Projects" option that was added in 22.04. It was enabled by default then and due to this Kate ends up accumulating projects which leads to very slow startup times after a while.

This setting can be disabled in the settings dialog: Project -> Restore Open Projects.

> Unfortunately, this is user-specific, so everyone would have to do that. How do I properly disable the project plugin for everyone?

This would be a sysadmin question, Kate doesn't control such things.

I would suggest:
- Try disabling the setting above and that should fix the issue for you hopefully
- upgrade to Kate 22.08 or newer if possible

We can also patch the 22.04 release but not sure if RHEL maintainers will update Kate and provide their users the said fix.
Comment 2 Gerhard S. 2023-12-14 11:44:04 UTC
> Try disabling the setting above and that should fix the issue for you hopefully

I'm trying to find a solution for my colleagues. Is there no config option I can put somewhere in /etc or /usr to disable certain plugins?
Comment 3 Christoph Cullmann 2023-12-18 18:51:23 UTC
I don't think that you can put any global config file for that somewhere. Sorry for that issue.
Later versions per default don't activate that feature at all.
For the git commands it seems strange that some remote command is triggered, we only do local ls-files for the projects.
In any case, the only simple solution seems to either update or tell your colleagues to disable that restore session.