Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vector Drawable is memory efficient?

Sorry for putting a obvious question (?) but it is troubling me for sometime. I am using Glide for image loading and find it quite well in memory management. Now I am thinking to move to Vector drawables with the help of MrVector. Do i really need to worry about the memory management?

For further info, each of my image in JPG of size 200KB-300KB will be become just 20- 30 KB in vector drawables. If this info helps in answering the question. Thanks

like image 828
nitinku5021a Avatar asked Mar 23 '26 17:03

nitinku5021a


1 Answers

Yes.

We had some PNG images that were only about 20kb but because we stretched them to the size of the screen, and Android converts them to bitmap in memory, they were more like 50MB!

Switching to vectors saved all of this memory.

like image 144
Le-roy Staines Avatar answered Mar 26 '26 07:03

Le-roy Staines



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!