Bug 512007 - Excessive delays when opening windows
Summary: Excessive delays when opening windows
Status: NEEDSINFO WAITINGFORINFO
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 6.4.5
Platform: Ubuntu Linux
: NOR grave
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-11-12 19:04 UTC by LSLSLS1
Modified: 2025-11-13 14:46 UTC (History)
3 users (show)

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


Attachments
recording of a measurement trial (807.10 KB, video/mp4)
2025-11-12 19:04 UTC, LSLSLS1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description LSLSLS1 2025-11-12 19:04:56 UTC
Created attachment 186732 [details]
recording of a measurement trial

SUMMARY
When opening software with a GUI, the window takes an excessively long time to open.

STEPS TO REPRODUCE
1. Open an empty text file

OBSERVED RESULT
Opening the empty text file takes about 0.291s.

EXPECTED RESULT
Opening an empty text file should take approximately 0.130s as reported by the 'time' terminal command.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 6.4.5
KDE Frameworks Version: 6.17.0
Qt Version: 6.9.2

ADDITIONAL INFORMATION
I'm using an empty text file as the primary example of excessively delayed window openings due to its lightweight nature, however, this problem applies to all pieces of software, not just text editors.
The text editor I'm using is gedit. Its startup time is either lower or equivalent to other popular text editors.

Using the 'time xdg-open' command to open an empty text file repeatedly gives a 'real' median value of about 0.130s. This value is probably a good indication of how long it should take to open a plain text document, but it is not the actual value of this task. To determine the actual time it takes to open an empty text file, I have performed the following test:
With a stopwatch running, the 'xdg-open' command is used to open the text file in gedit. This process is recorded at 120 FPS using OBS. Going through the recording frame by frame, it can be seen almost exactly when the command is sent to Konsole and when the window of gedit has opened. Subtracting the former from the latter gives the time it takes to open the text file.

Side note: Opening a text file (or any other window) by using enter or double-clicking it will make the program appear significantly earlier in Task Manager, but the total opening time of the window is about the same as when opening it with Konsole.

Due to frame time variations and other fluctuations, I ran 10 trials of the test in order to arrive at a reliable typical (median) value.
Here are the results of those trials:
0.291s
0.276s
0.291s
0.297s
0.285s
0.283s
0.305s
0.305s
0.284s
0.301s

min: 0.276s
max: 0.301s
median: 0.291s

I have attached a recording of one of the trials to this bug report. Explanation:
The terminal command text goes from highlighted to normal at 10:53.083. That's when enter is pressed.
At 10:53.384 the window has opened.
The time delay is therefore 0.384s - 0.083s = 0.301s.

These are the times I've measured for other programs (1 trial each):
KolourPaint: 0.194s
Kate (no document): 0.208s
LibreOffice Calc (no document) (window opened but blank): 0.262s
Calculator (gnome-calculator): 0.313s
LibreOffice Calc (no document) (everything loaded): 0.334s
Kate (empty document): 0.339s
mpv (no file): 0.395s
System Monitor: 0.403s
System Settings: 0.406s
Dolphin: 0.514s
Steam Friends List: 1.181s
Comment 1 Nicolas Fella 2025-11-13 13:37:22 UTC
xdg-open is a shell script that forwards to some other command (like kde-open). The time it takes until it finished has very little to do with how fast the application starts or how long it takes to open a file.

You seem to have measured the time it takes between running a command and a window appearing. I fail to see how the results suggest a problem in Plasma though. Different applications simply take a different amount of time to open, depending on what they are doing
Comment 2 LSLSLS1 2025-11-13 14:46:56 UTC
(In reply to Nicolas Fella from comment #1)
> xdg-open is a shell script that forwards to some other command (like
> kde-open). The time it takes until it finished has very little to do with
> how fast the application starts or how long it takes to open a file.
Maybe I'm not understanding you correctly, but I think this was already addressed in the side note.
xdg-open was used so it is clear exactly when the signal to open the file was fired; there is no visual indication of that happening when selecting the file and pressing enter.

> You seem to have measured the time it takes between running a command and a
> window appearing. I fail to see how the results suggest a problem in Plasma
> though. Different applications simply take a different amount of time to
> open, depending on what they are doing
When every single text editor takes twice as long (give or take) to open a text file as the default text editor in Windows, I think it would be unreasonable to blame the applications.

I might be able to replicate this test in Xfce, which has a reputation for being fast, if you're not satisfied with the amount of evidence I've presented so far.