ngerritsen / timiks

GNU General Public License v3.0
13 stars 5 forks source link

excessive CPU #45

Closed psifertex closed 1 year ago

psifertex commented 4 years ago
Screen Shot 2020-08-11 at 1 01 34 AM

Here's a quick screenshot of showing two timing sessions with timiks. After the first I noticed my fans were spinning up on my laptop so I looked at energy usage and sure enough chrome was going nuts. For comparison, after the second time I went over to cstimer and tested that and you can see the much, much smaller squiggles at the bottom.

However you're firing interrupts to do timing events, it's way too fast or it's inefficient and it's going to cause a lot f wasted clock cycles. Please consider a refactor or decreasing the callback timeout or however you're implementing the actual timer!

psifertex commented 4 years ago

For a bit more context, I've now tried in multiple browsers and operating systems. Doesn't look to be browser dependent, it's clearly an artifact of the design.

psifertex commented 4 years ago

I was hoping to work on a fix for this (I suspect it's the milisecond accuracy that was the issue and I was going to add a preference to switch to centisecond accuracy but was blocked by #47.

ngerritsen commented 4 years ago

Thanks for looking into this! This was indeed a trade off between the timer running nice and smooth and the performance for the user. I agree that users on lesser or battery powered devices should be able to enjoy the timer. I'll try to resolve #47 !