-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Enhancement] Convert all default image handling in Android over to using Glidex #3577
Comments
Not only pull it in, but make it a priority! |
Any news on this ? |
Also interested in this! |
@ederbond @psp589 While you're waiting for Glide support, maybe this would helpful:
|
so for iOS, what we need to use ? Due to curiosity, I'm asking, can we not use FFImageLoading directly for Android and iOS both for Image view in built ? |
GlideX has a sample app here and instructions about how to init It's basically just an Init call
That replaces our ImageHandlers for use with GlideX. If you look at the readme on that repository you'll see there are a number of tests @jonathanpeppers has done around Memory usage benefits but I'm also curious how adding the GlideX dependency influences startup performance. Here are the viable scenarios I see to test
With the image tests I'm curious if we will start seeing better load times with GlideX as the number of images that have to be processed increases. |
Sure. I'll validate the performance aspect of a private branch of main. Just cut the branch, prepare the PR, and I'll provide a profile against main. Right now I'm profiling the startup time of template apps. So what's the sartup time of zero images. It's not that the startup time of n images is not interesting, it's just that customers can always delay load images whereas there's nothing they can do about the template startup time -- that all us and only us. That said, there's nothing stopping a customer from injecting sampling points into their app (or trying the Android profiler if/when we can get accurate statup times). Given an app, I can demonstrate how to inject the sampling points. Tho, I'm fairly sure the advice I'd give would still be to delay load the images.
|
This will not happen anymore for Xamarin.Forms and I think we're already doing this or at least making great improvements in this area for .NET MAUI. Be sure to track the developments there :) Thanks! |
Description
Handling images in Android has always been problematic. We've made a number of improvements for a few use cases but overall it still isn't great.
Natively on Android google recommends using Glide for everything image related and we should do the same thing
@jonathanpeppers has already started the work over here
https://github.com/jonathanpeppers/glidex
Ideally we can take that work and pull it into the Android Platform core.
Glide can also handle animating gifs and efficiently caching all various sources of images
Implementation Details
Considerations
Performance Analysis
@jsuarezruiz performance tests are here https://github.com/jsuarezruiz/xamarin-forms-perf-playground
ImagePerformance.zip
The result:
Sharing some data like these in the Spec will help to easily understand the idea and why we want this change.
NOTE: Using 400 images. Tested with OnePlus 6.
Difficulty: Low
Peppers has already done all the heavy lifting
The text was updated successfully, but these errors were encountered: