linuxmint / mintreport

Troubleshooting tool
19 stars 18 forks source link

mintreport-tray: Can it just run once at login? #75

Closed edschindler closed 2 years ago

edschindler commented 3 years ago

I was looking into why the memory usage of mintreport-tray was increasing so much between restarts (see the issue 46 below). One of the culprits is the call to the system python package UbuntuDrivers in .../900_drivers/MintReportInfo.py:

            from UbuntuDrivers import detect
            devices = detect.system_device_drivers()

which adds a couple of MiB to the tray process every time it runs. You can also see the increase if you repetitively refresh the menu application.

Worse than memory use, though, is the amount of disk activity that's being generated. A gigabyte every 6 days. I feel my SSD's pain!

So I started down the rabbit hole of thinking about subprocesses to reclaim memory, etc, etc, etc.

Then I stepped back: why do I need to check for driver updates once an hour? For that matter, for new releases once an hour? Whether timeshift is set up right, once an hour? If LibreOffice needs a language pack once every single hour??

This leads me to wonder why these checks need to be done any more often than at login? (We are prompted to reboot for kernel updates every couple or three weeks, which would seem to suffice for the kinds of checks that mintupdate-tray is doing...) Do we need periodic checks at all? If we actually do, can we be a little smarter about how they use resources (not just memory)?

Ed

LinuxOnTheDesktop commented 2 years ago

The memory leak with MintReport - whereby, unfortunately, a tool designed to detect problems itself became a problem - is (completely?) fixed. See #46. As to the other periodic checks mentioned by Ed: well, one can change the interval; but perhaps the complaint is about the default intervals.

clefebvre commented 2 years ago

https://github.com/linuxmint/mintreport/commit/7fc8650f29ae58c4a3ffc09f6f6f6c6550cdc60c introduces the key com.linuxmint.report autorefresh. Disable it to disable refreshes.

The default refresh frequency is also changed from once every hour to once a day.