Bug 473310 - Discover takes up more than 700 MB of memory when showing the "updates" page
Summary: Discover takes up more than 700 MB of memory when showing the "updates" page
Status: CONFIRMED
Alias: None
Product: Discover
Classification: Applications
Component: discover (show other bugs)
Version: 5.27.7
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-12 10:59 UTC by Riccardo Robecchi
Modified: 2024-11-01 05:03 UTC (History)
4 users (show)

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


Attachments
Screenshot of KSysGuard showing RAM usage (99.56 KB, image/png)
2023-08-12 10:59 UTC, Riccardo Robecchi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Riccardo Robecchi 2023-08-12 10:59:16 UTC
Created attachment 160918 [details]
Screenshot of KSysGuard showing RAM usage

SUMMARY
On both a virtual machine and an old MacBook I have, both configured with 4 GB of RAM, Discover takes up more than 700 MB of RAM when launching it through the update icon in the system tray. Considering the amount of RAM available on the system, this is very significant.
It should be noted that in both cases the machines are quite vanilla, with little software installed, no PPAs configured, different themes (the VM, from which the screenshot comes, uses Breeze Dark; the MacBook uses WhiteSur) and no snaps or flatpaks installed. In both cases it is the plasma-discover process itself which takes up a large chunk of RAM. Both machines received new installations, with the VM being updated over the past couple of years and the MacBook over the past six months. It does not seem to matter whether there are updates available or not, as the memory usage seems to be consistent even when there are no updates available.
When launching Discover manually, therefore with it showing the homepage, the plasma-discover process takes up around 450 MB of RAM. This RAM usage is maintained more or less constant even when showing the updates.
The behaviour is not seen on my other machines, where Discover takes up ~300 MB of RAM, which seems to be the normal amount of memory.

STEPS TO REPRODUCE
1. Launch Discover from the "updates" system tray icon.

OBSERVED RESULT
Discover takes up more than 700 MB of RAM.

EXPECTED RESULT
Discover takes up less memory - the average seems to be ~300 MB.

SOFTWARE/OS VERSIONS
Linux: KDE neon
KDE Plasma Version: 5.27.7
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.10

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2023-08-12 13:26:21 UTC
Can reproduce. In fact, even when there are no updates available, the simply act of checking for updates seems to consume 200 MB and hold onto it until the program is closed.
Comment 2 Felix Urbasik 2024-04-04 09:15:16 UTC
I noticed similar behavior during installation of an app.

Steps:
1. Open Discover
2. Install LMMS (that's what I did)
3. Observe memory usage climbing to 600+ MB and dropping down back to ~100 MB once the app installation is complete.

System information:
Operating System: Arch Linux 
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.3
Kernel Version: 6.6.23-1.1-lts (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-3337U CPU @ 1.80GHz
Memory: 3,5 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 4000
Manufacturer: SAMSUNG ELECTRONICS CO., LTD.
Product Name: 900X3F
System Version: 0.1
Comment 3 Peter Eszlari 2024-11-01 05:03:28 UTC
https://news.ycombinator.com/item?id=39376653

quote by Michael Murphy (COSMIC developer):

"Where the elementary appcenter needs 900 MB, and KDE Discover needs 600 MB, the COSMIC Store needs only 60 MB. The COSMIC Store uses serde to serialize package metadata into a bitcode format, which uses significantly less memory and enables rapid application startup times. As a result, it does not need to run in the background, and it can search the entire database in realtime within 5ms."