Open jonbhanson opened 2 years ago
same problem
same problem + 1
same problem + 1
same problem + 1
If an animation is costly to draw, there is the possibility to draw all the frames in a List<Image>
and keep them in memory.
After the initial cache warmup, it's almost free to draw each frame. It will consume more memory but it can be an acceptable trade-off.
Here is an example of that technique: https://github.com/xvrh/lottie-flutter/blob/master/example/lib/examples/draw_cache.dart
Also High CPU usage
The next version v3.0.0-alpha.1
has an experimental parameter enableRenderCache
which is meant to make the rendering very cheap for the CPU in exchange of an increased memory usage.
Give it a try and report your experience.
please help same issue CPU utilization shoots to 100%
@jeslinjacob1995 can you try v3.0.0-alpha.4 with the renderCache
parameter and report with more information.
The package is great, thanks for your work in implementing it!
Sadly, though, I seem to be experiencing high CPU utilization as a result of using the package.
To reproduce, I used this example Lottie file: https://assets3.lottiefiles.com/packages/lf20_guwqiaxe.json. I dropped it into the default Flutter app and ran it on MacOS, and it consumes 20-25% of the CPU on my M1 Macbook Pro.