Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This introduces a cache for local image on macOS. There are no predefined limits set here (at least yet) since presumably we are loading a finite number of resources and we have the benefit of virtual memory swap on desktop so we don't really need to sweat a few extra megabytes of in-memory cache for images we know we'll need to repeatedly load. Local images don't use the shared RN image cache, and on macOS there's no automatic in-memory cache for local resources (other than the OS-level disk cache) so the `RCTImageFromLocalBundleAssetURL` function will synchronously access the disk on the main thread many times over during thread switching in Messenger Desktop. Added logging to confirmed cache works as expected in rn-tester, and instrumentation also confirms it.
- Loading branch information