Bug 491184 - Gwenview very slow to load on first launch
Summary: Gwenview very slow to load on first launch
Status: REPORTED
Alias: None
Product: gwenview
Classification: Applications
Component: general (other bugs)
Version First Reported In: 24.05.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-02 18:07 UTC by Eamonn Rea
Modified: 2025-08-01 08:48 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 Eamonn Rea 2024-08-02 18:07:27 UTC
SUMMARY
When launching Gwenview for the first time in a session, it takes a very long time to load images, particularly if the drive is not the boot drive. This happens regardless of which drive or folder I open, but after the first launch of Gwenview things are significantly faster. There is still a 5-ish second loading process.

The loading process causes Gwenview to be very unresponsive, so there is a lot of delay when zooming into images initiating actions such as a crop, etc. I was in the process of making another report and was using Gwenview to open some screenshots for comparison, and it took several minutes before everything fully loaded and I could get into using Gwenview. Once the number at the bottom of the screen actually represented the number of images in that folder and so had fully loaded it, things were smooth. 

This happens across SATA SSDs and m.2 NVMe SSDs, and also happened when I had an internal HDD which is no longer connected.

After this period, while it still takes Gwenview some 5-ish seconds, it's much faster than several minutes on the first boot. I have been able to reproduce similar behaviour on a separate device, although it is much faster (less than a minute) it still takes time for Gwenview to "warm up" on a first boot.

Perhaps Gwenview is trying to parse all images across drives or something? Since this happens regardless of which folder I open. There are a significant amount of images and videos across my devices, almost 70,000 on one drive on my PC. These are primarily large, uncompressed Steam Screenshots (thousands of these are 15-17mb). Maybe the volume and size of the files is causing Gwenview to take a long time to "load"?

Ideally, Gwenview would be as close to instantaneous when opening an image as possible, assuming adequate hardware and drive speed. 

STEPS TO REPRODUCE
1. Perhaps a prerequisite is to have a significant amount of high resolution, large image files. 
2. Open Gwenview for the first time on a boot.
3. It is significantly slower than you'd expect, taking at minimum about 30-45 seconds but upwards of several minutes before it can become usable.
4. Close Gwenview and re-open the image
5. It loads up much faster (the number at the bottom-middle of the display parses all images in the folder much more quickly.

OBSERVED RESULT
Gwenview is quite slow on a first load, but is faster on subsequent loads (although it could still be faster). Until it has fully loaded, it is too slow to interact with. As an example if you take a screenshot and want to crop it, it can take a very long time if you haven't opened Gwenview in that session. Even if you have, it is still slower than what it ideally should be.

EXPECTED RESULT
Gwenview should not necessarily load images faster, but become responsive faster, to increase workflow speed.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.1.3
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2
Kernel Version: 6.10.2-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 16 ร— AMD Ryzen 7 3700X 8-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: AMD Radeon RX 7900 XTX

ADDITIONAL INFORMATION
* This isn't new behaviour, it has been this way for many years, I just never got around to reporting it before :-) 
* I had a look around in the settings and didn't fine anything. Looking online it seems like people have complained about this before, but every issue I saw explicitly mentioned high CPU usage while loading. My CPU usage does not increase significantly overtime when waiting on Gwenview (there is a spike up to around 50% when opening but it dies down quickly).
Comment 1 Eamonn Rea 2025-05-29 21:37:39 UTC
This is still an issue with Gwenview 25.04.1. Gwenview takes several minutes if a folder even has only a few thousand images in it. I do not believe it has worsened per se since I opened this issue, I believe the load time just becomes longer as there are more images in a folder.
Comment 2 Lenzoid 2025-06-11 20:11:12 UTC
Thanks for your report! This to me sounds familiar from my experience with remote shares causing delays in applications starting (Gwenview, Dolphin). There are several open and confirmed reports for this. Is it possible that it is trying to wake up any sleeping disks or remote resources (like KDE Connect, network shares etc.) on your first startup?
Comment 3 John Kizer 2025-06-19 07:02:37 UTC
Updating the status here as this is pending some information from the reporter. Thanks!
Comment 4 Bug Janitor Service 2025-07-04 03:47:36 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Eamonn Rea 2025-07-17 04:33:10 UTC
Hey there! It should not be related to remote disks, as it works normally most of the time when using my boot drive. This even persists across a new installation on a new drive. On the boot drive, Gwenview opens images pretty fast, but on external drives it takes a long time if there are more than a few thousand images and videos.

The issue persists even if KDE Connect is not running.

I have tried a few of my other SATA drives too and the issue persists. The common factor here is that any drive that is not my boot drive and has a significant number of large images (thousands of 10mb+ each images) it can take quite a long time for Gwenview to open and become responsive.
Comment 6 Bug Janitor Service 2025-08-01 03:46:27 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 7 Lenzoid 2025-08-01 08:48:50 UTC
Yes, in with tens or hundreds of thousands of files Gwenview hangs quite a bit. From what I understand the problem is that Gwenview tries to get the MIME type of every file in the dir upfront before proceeding with rendering the images. 

There are a number of similar reports with some research done into optimizations regarding this. 

Most notably:
https://bugs.kde.org/show_bug.cgi?id=499806 AND
https://bugs.kde.org/show_bug.cgi?id=499551#c7

It sounds to me this is the same issue here, so we may consider flagging this as a duplicate.