Skip to content

Move multi-source image disk cache checks off the UI thread (#58701) - #58701

Closed
Abbondanzo wants to merge 1 commit into
react:mainfrom
Abbondanzo:export-D122082126
Closed

Abbondanzo wants to merge 1 commit into
react:mainfrom
Abbondanzo:export-D122082126

Conversation

@Abbondanzo

@Abbondanzo Abbondanzo commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary:

Avoid synchronous disk I/O while Android selects a source for multi-source images. The best source and bitmap-memory-cache preview are selected immediately. More precise alternate sources are ordered by size precision and submitted as a first-available disk-cache-only intermediate request, so Fresco probes them off the UI thread alongside the primary request while preserving the immediate memory preview.

Both Android image-view implementations submit one controller/show request immediately without asynchronous view callbacks or duplicate lifecycles. Drawee snapshots controller instrumentation once per request before its fallback suppliers run. The behavior remains behind a disabled-by-default runtime gate.

Changelog:
[Android][Fixed] - Avoid blocking the UI thread while selecting multi-source images

Reviewed By: javache

Differential Revision: D122082126

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 28, 2026
@meta-codesync

meta-codesync Bot commented Sep 28, 2026

Copy link
Copy Markdown

@Abbondanzo has exported this pull request. If you are a Meta employee, you can view the originating Diff in D122082126.

)

Summary:

Avoid synchronous disk I/O while Android selects a source for multi-source images. The best source and bitmap-memory-cache preview are selected immediately. More precise alternate sources are ordered by size precision and submitted as a first-available disk-cache-only intermediate request, so Fresco probes them off the UI thread alongside the primary request while preserving the immediate memory preview.

Both Android image-view implementations submit one controller/show request immediately without asynchronous view callbacks or duplicate lifecycles. Drawee snapshots controller instrumentation once per request before its fallback suppliers run. The behavior remains behind a disabled-by-default runtime gate.

Changelog:
[Android][Fixed] - Avoid blocking the UI thread while selecting multi-source images

Reviewed By: javache

Differential Revision: D122082126
@meta-codesync meta-codesync Bot changed the title Move multi-source image disk cache checks off the UI thread Move multi-source image disk cache checks off the UI thread (#58701) Oct 7, 2026
@meta-codesync meta-codesync Bot closed this in cf1fc01 Oct 8, 2026
@meta-codesync meta-codesync Bot added the Merged This PR has been merged. label Oct 8, 2026
@meta-codesync

meta-codesync Bot commented Oct 8, 2026

Copy link
Copy Markdown

This pull request has been merged in cf1fc01.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant