-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use isolates to perform decoding #25
Comments
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? |
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. |
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. |
Thanks @Praveen-0603 this package solved all my problems. |
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.
The text was updated successfully, but these errors were encountered: