Kasper24 / KwesomeDE

A desktop environment made in AwesomeWM
329 stars 18 forks source link

fix: improve CPU usage from needless garbage collection #15

Closed Ryex closed 1 year ago

Ryex commented 1 year ago

I've been having issues with teh garabe collection timer going off every 5 seconds. my laptop is form 2011 and have 30%-50% cpu usage spikes every tie it runs.

This adds some simple checks to only force run the garbage collection if memory has grown too fast since the last run or if it's waited about 5 minutes.

this has significatly improved my usage experience.

Kasper24 commented 1 year ago

I actually had the timer disabled in my machine because running the GC makes everything freeze, so having it loop every 5 seconds was not a good idea. Thanks for this! Also, on a side note I reworked the settings manager, so you need to re-set the settings if you had anything changed (you should also see a notification when you restart awesome with the changes pulled and there's a tab with breaking changes in settings->about->breaking changes)