jeticg / Evangelion-Uebersicht-Widget

Evangelion Style Übersicht Widget.
MIT License
74 stars 23 forks source link

CPU load on warning. #11

Closed donkahlero closed 7 years ago

donkahlero commented 7 years ago

Hi guys, first of all: very nice widget!

Nevertheless, as soon as my battery drains down to 20%, the warnings are starting to arise on the cells. Which is - perse - no issue at all. But unfortunately, the rendering of the flashing cells is apparently heavy on the CPU. After half a minute, the fan goes nuts and the battery drains even faster.

My suggestion just color the battery tile in red - without flashing - to be better on the CPU.

I am running a MB Pro early '15 with the lowest i5 + 16GB RAM.

Cheers

donkahlero commented 7 years ago
jeticg commented 7 years ago

Hi,

Thanks for contacting me. This is a known issue, after all I have been looking for ways to improve energy consumption for this widget for quite a while, and to tell you the truth, it really is a trade off. After all, this widget’s primary purpose is to serve my demands, so when it comes to my approach, it would be very much tailored for myself.

I personally own 4 Macs, two 15’ MacBook Pros, one 11’ lowest MacBook Air, and a Mac Pro trash can. I don’t often use my computers without power supply, and even when I do, it’s like 4-5 hours tops, which is something even my lowest MBA could do(with übersicht). However, the power this widget requires is still very high, part of the reason is that the graphical interface of this widget is entirely accomplished by CSS, which means I do literally draw every lines by hand.

Now, the solution. The easiest ways are:

  1. Lower the refresh frequency, right now it's once every 3000ms. You can change the value to 5000ms, I think it’s going to be a lot better.
  2. Lower the battery warning level from 20% to 10% or perhaps 5%. This feature, in fact this entire widget(just like most of the other widgets) does absolutely nothing except for looking cool, it’s not like your Mac is not going to let you know when you are out of juice.

Both of these changes are relatively easy with a bit of programming background. The code is in the index.coffee file.

If you are still not satisfied with my answers, I can take a note so when I do find time to work on some improvements, I might think of something. But there is no promise sadly, I am awfully busy and as long as the widget works(for me obviously), I don’t think I could spare enough time on it. After all, it’s only a hobby.

Best wishes.

— Jetic jetic@me.com

jeticg commented 7 years ago

OK, so I managed to completely resolve this problem in 0.X2a. Please do check it out.

donkahlero commented 7 years ago

Checked it out... Kinda the same for me. Maybe I will just fork for personal use and remove the coloring of all tiles (and the flashing) :)