After some investigation it looks like a simple call to apt.Cache() from the python apt module is responsible for the high memory usage of mintUpdate. Without this call mintUpdate uses 4.6MB of RAM. As soon as the module is called the memory usage grows to 47MB. The python interpreter doesn’t free up memory and an additional 47MB of RAM is reserved every time mintUpdate refreshes (every 5 minutes by default).
Of course mintUpdate relies on the apt module to get the list of available packages so we’ll need to find some decent solution to replace this call. Either we’ll manage to force python in freeing the memory used by the module or we’ll rely on APT directly without using the module.
Anyway, the next release of mintUpdate should use around 5MB of RAM and this shouldn’t grow over time.
Note: This comes as excellent news as I was personally worried that we would have to rewrite mintUpdate from scratch using another language. The java-gnome bindings lacked popularity and were not even packaged for Debian. Perl kind of scared me a bit when it came to OO-threaded development and I wasn’t particularly amused at the thought of using C++ (although I must say I was quite impressed with how Eclipse handles C++ and with the quality of the Gtkmm API). Well anyway, more on this later.. and hopefully we’ll stay with Python, at least for already existing Mint apps.
Edit: Apparently python won’t let us force any garbage collection. However the apt module can be replaced entirely by calls to “sudo apt-get -s upgrade | grep ^Inst” and “sudo apt-get -s dist-upgrade | grep ^Inst”. We’ll even save calculating dependencies ourselves…
Clem
Pure Japanese 🙂
Thanks for your good work and dedication.
Ok, in English so: mintUpdate uses a lot of memory (it’s currently at 80MB on my system). The next release should only use about 5MB.
Is there a way to stop mintUpdate from auto starting in KDE Beta 44?
Independent of memory problem, i think that also will be good to increase the check-in period from 1 hour max to 1 day at least.
i found quite annoying that every 5 min (the standard) the system have to connect to Internet to check if something new is over there; maybe is the most secure way but are we not “over securing” the system near the paranoia?
When will this release happen? In Mint 5 or there will be backports to Mint 4.0?
Keep on the good work!
Nice to hear! 😉 Great news! I hope to see a backport soon!
And like Mortanauta, I prefer updates check once a day.
Ok, problem fixed. It’s using about 8MB and the memory usage doesn’t go up over time. When refreshing it’s using 28MB and the additional 20MB get freed as soon as it’s finished.
There are other goodies coming with this release (it’s planned for mint 5 by the way) but I’ll let you see that when the package is announced in Romeo.
Clem
Please fix this for daryna 4 as an urgent update.
I agree with Mortanauta on update intervals. 1,2,4,8,12, 24 hour intervals are sufficient. Or to think of it another way this would check for updates 1x,2x,3x,6x,12x per day. This gives a wide choice for the user.
I would also like to see a notification bubble for urgent upgrades. (I’m not sure if this is already included).
Thank you for your hard work and dedication.