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
[Feature] Optimization required: It is taking to long for the grid to show #116
Comments
Seems no improvement for me. The method requires you to throw assets into it, then you'll back to the very start of the issue which is the duration when getting assets list.
Yes this is how it works currently. Load assets list, layout the grid, and items take care of the thumbnail themselves.
IMO there's no need for testing. You can directly see their difference between the grid and the preview. |
Do you have any other suggestion on how to optimize the grid loading? |
Not really. This might requires more enhancements from the |
Thanks! |
i just wanted to also state, that some of my alpha tester, who have android devices, also complaint, that the loading time for the assets within the grid, is really slow. Apparently this problem is not really a big problem for iOS but it is was Android. If I can help somehow, please let me know and I can review the necessary android code to adjust it. Maybe one possibility would be to give the grid a stream of thumbnails instead of all images at once, to reduce the loading time. Kind regards, |
Actually we heard more complaint about this issue on iOS. But no matter which platforms are suffering this problem, we should definitely discuss this in the I'll give some detail about the laggy part which the picker mainly suffered. Grid is always spinningflutter_wechat_assets_picker/lib/src/provider/asset_picker_provider.dart Lines 260 to 261 in 77d86b5
The reason why the grid spins too long is caused by these methods, and they must be called in proper sequence. Anyone who wants to test how long these methods been taken, can place a Thumbnails/Original files are slow with renderingThumbnails are provided by some native dependencies, e.g. Glide on Android, which requires a generate process when reaching them. Then they'll be copied in the Flutter's channel pipeline. This is how copies were transferred under the Android platform: MediaStore -> Too many copies required to generate during this process, which means some laggy were produced by the architecture of channels. However, it can be some solutions to particialy solve this issue, but more specific solutions are still under investigation by Flutter team. See https://discord.com/channels/608014603317936148/846507907876257822/850072476402450433 as we've discussed this few weeks ago. |
Has anyone found a solution? The asset picker is functionally great, but it takes almost 10s on my iPhone SE (in release mode) for photos to start showing. |
Same here, like 10 seconds on an iPhone 12 Pro. |
If anyone still facing the same issue like this, or fluttercandies/flutter_photo_manager#711, please help us by running the latest example of |
We've shipped the 7.0.0 version which brought a bunch of improvements from the photo_manager 2.0.0 version. Closing since we have few samples to solid reproduce this issue. |
I reproduce this issue in google So in summary if we clear the data and filter only videos that time I am able to reproduce this bug. |
@kartik1225 If it's able to reproduce, please file issues against |
Version information
Is your feature request related to a problem?
Opening the picker, it is taking too long until the grid appears with the images.
If you compare the performance to other pickers in the market, this picker takes a long time to present the grid.
Describe the solution you'd like
I have tried to run some tests to focus on the performance bottle neck. I am not sure, but it appears that the generation of the thumbnail per image is taking quite some time:
output:
Note:
There is a bug in the "Custom Image Preview thumb size". It is not actually working - the thumb size is lost in the way. I will submit a PR to fix it (the bug is NOT in the example code but in the plugin itself).
Describe alternatives you've considered
Several solutions which should be inspected
The text was updated successfully, but these errors were encountered: