rickyrockrat / parcellite

GNU General Public License v3.0
220 stars 29 forks source link

High power consumption #61

Closed krlmlr closed 2 years ago

krlmlr commented 2 years ago

powertop reports >100 mW power consumption for parcellite on an idle Ubuntu 20.04 system. This is quite a lot.

Does the application use polling? Can this be reduced or worked around?

rickyrockrat commented 2 years ago

It does, unfortunately use polling. I don't know of another way to monitor the clipboard from GTK. I am considering re-writing something that uses X at a lower level with all the GTK churn. It currently uses g_timeout_add with a 500mS rate (1/2 second). I did play with the value because I noticed something similar, and settled on that value because longer times would miss clipboard entries. I can make an option to change it, but not sure it's going to give you what you want. I would love to have a callback, but the X clipboards are interesting creatures. If you know a way, let me know. There may be, I just haven't done a lot of research on it. It's an inherited project.