-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Add custom Fresco decoder for binary XML #46711
Conversation
This pull request was exported from Phabricator. Differential Revision: D63476283 |
This pull request was exported from Phabricator. Differential Revision: D63476283 |
2185c3b
to
64c8a0f
Compare
Summary: Pull Request resolved: facebook#46711 ## Summary Vector drawable decompression is a blocking operation and can sometimes take upwards of 20-30ms per image, especially if that vector drawable uses complex colors. Less complex vector drawables still take several milliseconds to decompress and are served from a cache on later load attempts. Here's a list of all the load times of vector drawable images in FBVR: {F1891592104} This diff aims to shift decompression to one of Fresco's decode threads, off the main thread, so we don't block while waiting for decompression operations to complete. This relies on adding a new custom decoder that reads the header of XML binary and converts encoded image requests to drawable objects that are yielded from the new `XmlDrawableFactory`. It's important to note that this change does not stop `ReactImageView` from loading XML-based drawables on the main thread, it merely offers a new mechanism for loading them. ## Changelog [Android][Added] - Add a new Fresco decoder for XML resource types Differential Revision: D63476283
This pull request was exported from Phabricator. Differential Revision: D63476283 |
Summary: Pull Request resolved: facebook#46711 ## Summary Vector drawable decompression is a blocking operation and can sometimes take upwards of 20-30ms per image, especially if that vector drawable uses complex colors. Less complex vector drawables still take several milliseconds to decompress and are served from a cache on later load attempts. Here's a list of all the load times of vector drawable images in FBVR: {F1891592104} This diff aims to shift decompression to one of Fresco's decode threads, off the main thread, so we don't block while waiting for decompression operations to complete. This relies on adding a new custom decoder that reads the header of XML binary and converts encoded image requests to drawable objects that are yielded from the new `XmlDrawableFactory`. It's important to note that this change does not stop `ReactImageView` from loading XML-based drawables on the main thread, it merely offers a new mechanism for loading them. ## Changelog [Android][Added] - Add a new Fresco decoder for XML resource types Differential Revision: D63476283
5eed176
to
9285846
Compare
Summary: Pull Request resolved: facebook#46711 ## Summary Vector drawable decompression is a blocking operation and can sometimes take upwards of 20-30ms per image, especially if that vector drawable uses complex colors. Less complex vector drawables still take several milliseconds to decompress and are served from a cache on later load attempts. Here's a list of all the load times of vector drawable images in FBVR: {F1891592104} This diff aims to shift decompression to one of Fresco's decode threads, off the main thread, so we don't block while waiting for decompression operations to complete. This relies on adding a new custom decoder that reads the header of XML binary and converts encoded image requests to drawable objects that are yielded from the new `XmlDrawableFactory`. It's important to note that this change does not stop `ReactImageView` from loading XML-based drawables on the main thread, it merely offers a new mechanism for loading them. ## Changelog [Android][Added] - Add a new Fresco decoder for XML resource types Reviewed By: javache Differential Revision: D63476283
This pull request was exported from Phabricator. Differential Revision: D63476283 |
1 similar comment
This pull request was exported from Phabricator. Differential Revision: D63476283 |
9285846
to
7125b15
Compare
Summary: Pull Request resolved: facebook#46711 ## Summary Vector drawable decompression is a blocking operation and can sometimes take upwards of 20-30ms per image, especially if that vector drawable uses complex colors. Less complex vector drawables still take several milliseconds to decompress and are served from a cache on later load attempts. Here's a list of all the load times of vector drawable images in FBVR: {F1891592104} This diff aims to shift decompression to one of Fresco's decode threads, off the main thread, so we don't block while waiting for decompression operations to complete. This relies on adding a new custom decoder that reads the header of XML binary and converts encoded image requests to drawable objects that are yielded from the new `XmlDrawableFactory`. It's important to note that this change does not stop `ReactImageView` from loading XML-based drawables on the main thread, it merely offers a new mechanism for loading them. ## Changelog [Android][Added] - Add a new Fresco decoder for XML resource types Differential Revision: D63476283
Summary: ## Summary Vector drawable decompression is a blocking operation and can sometimes take upwards of 20-30ms per image, especially if that vector drawable uses complex colors. Less complex vector drawables still take several milliseconds to decompress and are served from a cache on later load attempts. Here's a list of all the load times of vector drawable images in FBVR: {F1891592104} This diff aims to shift decompression to one of Fresco's decode threads, off the main thread, so we don't block while waiting for decompression operations to complete. This relies on adding a new custom decoder that reads the header of XML binary and converts encoded image requests to drawable objects that are yielded from the new `XmlDrawableFactory`. It's important to note that this change does not stop `ReactImageView` from loading XML-based drawables on the main thread, it merely offers a new mechanism for loading them. ## Changelog [Android][Added] - Add a new Fresco decoder for XML resource types Reviewed By: mdvacca Differential Revision: D63476283
7125b15
to
b612371
Compare
This pull request was exported from Phabricator. Differential Revision: D63476283 |
Summary: ## Summary Vector drawable decompression is a blocking operation and can sometimes take upwards of 20-30ms per image, especially if that vector drawable uses complex colors. Less complex vector drawables still take several milliseconds to decompress and are served from a cache on later load attempts. Here's a list of all the load times of vector drawable images in FBVR: {F1891592104} This diff aims to shift decompression to one of Fresco's decode threads, off the main thread, so we don't block while waiting for decompression operations to complete. This relies on adding a new custom decoder that reads the header of XML binary and converts encoded image requests to drawable objects that are yielded from the new `XmlDrawableFactory`. It's important to note that this change does not stop `ReactImageView` from loading XML-based drawables on the main thread, it merely offers a new mechanism for loading them. ## Changelog [Android][Added] - Add a new Fresco decoder for XML resource types Reviewed By: mdvacca Differential Revision: D63476283
This pull request has been merged in 118b7c1. |
Summary
Vector drawable decompression is a blocking operation and can sometimes take upwards of 20-30ms per image, especially if that vector drawable uses complex colors. Less complex vector drawables still take several milliseconds to decompress and are served from a cache on later load attempts.
Here's a list of all the load times of vector drawable images in FB:
This diff aims to shift decompression to one of Fresco's decode threads, off the main thread, so we don't block while waiting for decompression operations to complete. This relies on adding a new custom decoder that reads the header of XML binary and converts encoded image requests to drawable objects that are yielded from the new
XmlDrawableFactory
.It's important to note that this change does not stop
ReactImageView
from loading XML-based drawables on the main thread, it merely offers a new mechanism for loading them.Changelog
[Android][Added] - Add a new Fresco decoder for XML resource types
Differential Revision: D63476283