I've been looking into memory consumption for Pop!_OS's fork of Appcenter (https://github.com/pop-os/shop/issues/257). I haven't done any profiling on Elementary, but I'd be interested to know if the results are similar.
The output from Valgrid's massif tool seems interesting:
I'd need to do more testing and get more familar with massif to understand if this 879.8 MiB is (largely) leaked, but it seems considerable for even peak memory consumption from that library.
This seems to indicate that most of the excessive memory consumption we've been seeing with Pop Shop (and presumably Appcenter) is allocated by libostree, a dependency of libflatpak. It may not be well tested for long running applications.
I've been looking into memory consumption for Pop!_OS's fork of Appcenter (https://github.com/pop-os/shop/issues/257). I haven't done any profiling on Elementary, but I'd be interested to know if the results are similar.
The output from Valgrid's massif tool seems interesting:
I'd need to do more testing and get more familar with massif to understand if this 879.8 MiB is (largely) leaked, but it seems considerable for even peak memory consumption from that library.
This seems to indicate that most of the excessive memory consumption we've been seeing with Pop Shop (and presumably Appcenter) is allocated by libostree, a dependency of libflatpak. It may not be well tested for long running applications.
This Gnome Software issue looks like they may have a similar problem.
Steps to Reproduce
valgrind --tool=massif --depth=5 --alloc-fn=g_malloc --alloc-fn=g_realloc --alloc-fn=g_try_malloc --alloc-fn=g_malloc0 --alloc-fn=g_mem_chunk_alloc build/src/io.elementary.appcenter
(as suggested in Gnome Optimization Guide).massif-visualizer
to display results.Platform Information
Compiled from 42320e94c534531a16803805999f98603eae38d9 on Pop!_OS 20.10, with libostree
2020.6-1
and libflatpak1.8.5-1pop1~1612228017~20.10~7ba959a
.