HomePhabricator
Diffusion Comm 0f2665625267

[native] cache LoadableImage in memory and disk

Description

[native] cache LoadableImage in memory and disk

Summary:
The disk lookup for avatars with remote URLs causes a flicker. We can cache in memory as well to remove this flicker. We keep the disk cache as a fallback (e.g. for offline mode).

From the expo docs:

Memory cache may be purged very quickly to prevent high memory usage and the risk of out of memory exceptions.

It seems safe to cache in memory, and I feel like we've seen this flicker elsewhere (maybe encrypted images?), so I've changed the cache policy for all LoadableImages, but can narrow the scope to just Avatars if desired.

Test Plan: Confirmed on simulator and physical device that flicker doesn't occur

Reviewers: bartek, ashoat, angelika

Reviewed By: ashoat

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D14443

Details

Provenance
varunAuthored on Sat, Mar 15, 11:00 AM
Reviewer
ashoat
Differential Revision
D14443: [native] cache LoadableImage in memory and disk
Parents
rCOMMc019d4dbe1e7: [native] Move ErrorBoundary inside Identity and Tunnelbroker context
Branches
Loading...
Tags
Loading...