Open eirikskogoy opened 4 months ago
Thanks for the info, did you verify this in a new flutter project using only this package?
I also get very high CPU usage when using this timer. I thought it was because my interval was 10ms but it's the same at 100ms.
I imagine it's because it uses a Timer with a period of 500 microseconds internally? Perhaps that could be configurable if we don't need that level of precision?
Thanks for the info, did you verify this in a new flutter project using only this package?
Sorry for not replying before now. I didn't test it a separate project. But removing it and using the standard Timer.periodic lowered the cpu usage from typical 80% to 5%
^^"
Please excuse the long delay, have been very busy lateley.
Most likely this issue is connected to the underlying timer ticking as frequent as possible to achieve maximum precision.
Honestly I think this was a oversight of mine back then.
Maybe using the standard timer is better, if you really need super mega ultra precision this solution here might be good, as long as the duration is not too long and you are not using it constantly.
:)
I also get very high CPU usage when using this timer. I thought it was because my interval was 10ms but it's the same at 100ms.
I imagine it's because it uses a Timer with a period of 500 microseconds internally? Perhaps that could be configurable if we don't need that level of precision?
I'll happily review, merge and update the package if you could kindly provide the required changes in a PR :)
Hi :) Experience very high CPU usage when using this, has anyone else experienced the same?