Skip to content

Zero-copy ArrayBuffer for Java TM - #57897

Draft
paradowstack wants to merge 1 commit into
react:mainfrom
paradowstack:feat/zero-copy-array-buffers-java
Draft

Zero-copy ArrayBuffer for Java TM#57897
paradowstack wants to merge 1 commit into
react:mainfrom
paradowstack:feat/zero-copy-array-buffers-java

Conversation

@paradowstack

Copy link
Copy Markdown
Contributor

Summary:

Android TurboModules always copied JS ArrayBuffer arguments into a Java-owned direct ByteBuffer, so sync in-place mutation was impossible.

This matches the iOS zero-copy path: sync calls alias JS bytes (or retain native-backed buffers); async void/Promise calls still copy. Returning the same aliased argument reuses its backing store.

Changelog:

[ANDROID] [ADDED] - Zero-copy JS→Native ArrayBuffer for synchronous TurboModule calls

Test Plan:

  • C++ API snapshots regenerated

@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 Aug 11, 2026
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. p: Callstack Partner: Callstack Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant