Bug 478629 - Kate is very slow to Launch, and very slow to open even a simple Text file with a couple paragraphs (even on a fresh Win11 install)
Summary: Kate is very slow to Launch, and very slow to open even a simple Text file wi...
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (other bugs)
Version First Reported In: 23.08.0
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-17 07:00 UTC by Zacchino
Modified: 2024-05-03 05:55 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 Zacchino 2023-12-17 07:00:52 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1.  Open a simple Text file with 2 paragraphs of texts
2.  Wait, and wait, and wiat
3.  It opens only after between 10-15s,

OBSERVED RESULT
This lag when opening a simple Text file is huge compared to Notepad++ and others.

EXPECTED RESULT
Opening Kate in less than a second, even less...

SOFTWARE/OS VERSIONS
Windows: 11 22H2
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
I've tried Kate on a fresh setup of Win11, and same issue. Very slow at launching the app itself, or opening a file. It's so irritating that sometimes I wish I could find an alternative (but Kate is the most well thought-out text editor out there, and I've tested SublimeText, Atom, and so on... Notepad++ is great but its UI is aweful, not as refined and tasteful as Kate IMO)
Comment 1 Waqar Ahmed 2023-12-17 07:24:06 UTC
The first launch of Kate is slow because I assume we are loading a lot of libs. I have noticed this as well. But in my experience, subsequent launches were faster. Is it not the case?
Comment 2 Christoph Cullmann 2023-12-18 18:03:07 UTC
I don't see an obvious way to improve that, beside perhaps for KF6 to link to the icons instead of loading the large binary resource file. Beside that the most startup time should just be dll loading.
Comment 3 Waqar Ahmed 2024-02-19 06:27:25 UTC
Can you try to disable the plugins and see if the speed improves?
Comment 4 Zacchino 2024-02-19 08:36:10 UTC
Hello,

I have tried with no plugins activated. And the only Plugin I have is a Diff Compare (can't recall witch, but it took me a while to find one that was as simple ie on 2 tabs like Notepad++, which is a seperate issue I guess, but hey, I'm still grateful for Kate cuz its UI is amazing).

So yeah, even before installing this Diff Compare plugin, the very slow start of Kate is excruciating. 
I even did a fresh Win11 install on another SSD, and Kate is still very, very slow, not only at the first but the second start, even for opening a simple TXT file with a couple lines.

And I'm on a 32gb DDR /  12th Gen Core i7 1255U Laptop. So even Google Chrome with AAALLL my Extensions takes less time to open than Kate.

I don't know what to tell you guys, it's something I can't seem to find out why it's only happening to me apparently, or maybe am I the only one using Kate on Win11 as of today lol? Wait, is that it?
Comment 5 Waqar Ahmed 2024-02-19 09:33:18 UTC
Hmm, we don't have a Diff Compare plugin... So perhaps you are talking about something else. Just to be clear, by plugins I mean the ones listed under `Main Menu -> Settings -> Configure Kate -> Plugins`.

Our diff/compare functionality is built inside the editor. If you have git installed and its available in your PATH, just right click on the tab and "Compare with active doc"

To debug this further, 

- Are you using sessions? 
- Try to see what's in the directory: %USERPROFILE%\AppData\Local\kate\sessions , maybe remove it temporarily to see if it changes anything.

We do have a lot of users on Windows. We don't have many users reporting bugs and we don't have (AFAIK) any developers actively working on Kate on windows.
Comment 6 Zacchino 2024-02-19 09:53:23 UTC
About the Diff Tool:
I can't recall witch one but I'm pretty sure I've been looking and installed a Diff Tool (like Meld 3.22) plugin on Kate, or maybe am I using the one that's on Kate by default (but you tell me there's none right?).
Because if I didn't find a Diff Tool for Kate, I'd most likely wouldn't have adopted it as my default IDE / Text Reader.

FYI: I come from NotePad++, then switched to SublimeText, and somehow I found out Kate was way more straight forward and logical).

About the %LocalAppData%\Kate\Sessions Folder:
It was completely empty, but I removed it and tried launching Kate, it was a little bit quicker but as someone mentionned in this thread, the 2nd time launching is noticeably faster indeed, but still not as snappy and quick as SublimeText, NotePad++ and so on.

Am I the only one experiencing this launch / performance issue?
Comment 7 Waqar Ahmed 2024-05-02 06:47:03 UTC
Hi, can you try the latest nightly and see if improves things: https://cdn.kde.org/ci-builds/utilities/kate/master/windows/
Comment 8 Zacchino 2024-05-02 15:53:37 UTC
(In reply to Waqar Ahmed from comment #7)
> Hi, can you try the latest nightly and see if improves things:
> https://cdn.kde.org/ci-builds/utilities/kate/master/windows/

Hello Waqar!
Yes! Thank you so so much for your nightly update! 

- Alright I'm upgrading it as we speak.
- Update successfully Installed on Win11 22H2...
- Alright let's give it a shot, opening a simple .txt file with Kate.

WOW!!! This is night and day!!! It opens up in the blink of an eye!!! What did you do? How the heck did you... OMG this is insane!!!
It opens even faster than Notepad++ if not faster!!!

Gosh you're a magician, I'm litterally tearing up right now. Thank you so so much Waqar! I'm so grateful for this update!!!
Comment 9 Waqar Ahmed 2024-05-03 05:55:24 UTC
Thanks for testing :)

It was a few patches, most noticeably I think the removal of dbus on windows by Christoph might have helped improved the startup times. There might be more small improvements in the future.

Will close this for now.