stretchly icon indicating copy to clipboard operation
stretchly copied to clipboard

[Bug]: Stretchly on M1 seems to be consuming too much energy

Open acyment opened this issue 1 year ago • 5 comments

Version

  • [X] I'm using version 1.13.1

Known issues

  • [X] I've checked Known issues

Existing issues

  • [X] I've checked Existing issues

What operating system are you using?

macOS

Operating System Version

Ventura 13.2.1

Reproduction steps

  1. Open Stretchly
  2. Open Activity Monitor
  3. Check energy consumption

Expected Behavior

I would expect a fairly passive app like Stretchly to be in the low consuming spectrum. I am currently using Time Out, not because I like the experience better, but because consumption seems to be approximately 5x lower.

Thanks for the hard work!

Actual Behavior

Screenshot 2023-03-03 at 10 52 02 Screenshot 2023-03-03 at 10 52 18

Apple's algorithm for estimating energy consumption is closed source (sucks), but there seems to be a correlation with the amount of threads and idle wake ups.

Relevant log output

No response

Preferences

No response

Additional information

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

acyment avatar Mar 03 '23 13:03 acyment

Hi,I don't have mac with M, but Stretchly is build with ElectronJS which is resource hungry ;/

there seems to be a correlation with the amount of threads and idle wake ups. Do you mean it goes up when your computer comes back from idle? Number of processes that Stretchly has should stay same-ish over time. (Processes get created when break starts but they should get destroyed when they end)

hovancik avatar Mar 04 '23 15:03 hovancik

@hovancik Just wondering — have you considered replacing Electron with Tauri? Just like Electron, it's a framework for building desktop apps with web technologies, but unlike Electron, it uses a platform's native WebView rather than bundling Chromium and is more optimized for a smaller footprint and lower memory usage.

That could perhaps help make Stretchly more efficient on all platforms.

12people avatar Oct 12 '23 13:10 12people

Yes, I did when Stretchly was not so big. At that time Electron alternatives didn't have Tray or Building packages.

Some of them have now, but with the current amount of code it basically means starting from scratch.

hovancik avatar Oct 13 '23 08:10 hovancik

Oh, ok, I understand.

12people avatar Oct 13 '23 09:10 12people

I'm on an M1 Pro here, macOS Monterey (12.7.1) and stretchly 1.14.1, but I don't have the same excessive amount of resources used as reported here.. It's still an electron app, of course, so its fingerprint is not as small as a native app could get to, but it seems reasonable? Reported 12h power is 0.55 (whatever that means) here. Screenshot 2023-11-06 at 13 00 27

StevenM1 avatar Nov 06 '23 12:11 StevenM1