Open aarol opened 3 years ago
Yes, this implementation is necessary for very large images and does not block the application
My application is lagging and frames are dropping constantly. How can I resolve this?
My application is lagging and frames are dropping constantly. How can I resolve this?
Are you using the code from the example? It should lag only for a small period probably due to memory being copied from the isolate.
My application is lagging and frames are dropping constantly. How can I resolve this?
https://pub.dev/packages/wallpaper_manager_flutter use this package
Use this package, there will be no lag even for 4k images, thanks to @aarol for the idea.
Currently the performance is not very good, because the image decoding is done on unefficiently here. The decoding happens on the main thread which hangs up the application. The solution to this is to run the decoding process in a separate isolate and sending the bytearray throught the method channel.
I have made a barebones example of this approach which uses very big images and the performance gain is noticeable, there are no frame drops on my emulator.
I'm hoping someone with more knowledge of the package could implement this.