MatthiasGrandl / Loungy

Loungy is a WIP launcher in the vein of Spotlight, Alfred, Raycast.
MIT License
1.48k stars 71 forks source link

Investigate/Fix CPU utilization #29

Open MatthiasGrandl opened 6 months ago

MatthiasGrandl commented 6 months ago

Loungy is pretty heavy on CPU. It's not acceptable for it to use 1.5% of my CPU while running in the background, draining my battery.

Even worse, it seems after some sleep/wakeup cycles Loungy sometimes goes into a state of hogging the entire CPU, making my MacBook run hot and draining the battery insanely fast. I have yet to figure out what causes this.

MatthiasGrandl commented 6 months ago

I fixed the wakeup issue in GPUI, waiting for feedback from upstream if the fix can be upstreamed, but for Loungy purposes it works nicely.

MatthiasGrandl commented 6 months ago

Another issue is the current clipboard implementation. If you have a big image in the clipboard, it's bytes get hashed every second, which causes huge CPU utilization. Instead of polling arboard I should implement a platform specific clipboard watcher that notifies the clipboard module somehow.

done