Skip to content

perf: Intern easings and route properties by id across the transition JNI - #10114

Closed
MatiPl01 wants to merge 3 commits into
@matipl01/android-css-frame-pump-enginefrom
@matipl01/android-css-transition-frame-pump
Closed

MatiPl01 wants to merge 3 commits into
@matipl01/android-css-frame-pump-enginefrom
@matipl01/android-css-transition-frame-pump

Conversation

@MatiPl01

@MatiPl01 MatiPl01 commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

Makes the hot per-transition JNI call all-primitive. Easing curves are registered once per distinct curve (cssDefineEasing) and referenced by id afterwards, and properties map to compile-time int ids on both sides, so starting a transition no longer allocates a jstring and two jfloatArrays per call - at heavy churn (hundreds of views re-rendering many times per second) that removed tens of thousands of transient Java objects per second from the GC.

The Kotlin interpolator cache disappears with it: the interpolator is resolved once when the easing is defined and carried in the start command. The intern table is capped; an app computing easing points at runtime past the cap falls back to the loop path through the existing demotion contract, which plays any easing.

Commands now carry their (viewTag, propertyId) key directly, so pending-command checks and the flush dispatch read as one-liners.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (3)
  • main
  • ^[0-9]+.[0-9]+-stable
  • ^worklets-[0-9]+.[0-9]+-stable

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f92bb7a4-97e2-486f-a1b0-999432002432

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@MatiPl01 MatiPl01 self-assigned this Jul 31, 2026
@MatiPl01
MatiPl01 marked this pull request as ready for review August 3, 2026 05:54
@MatiPl01
MatiPl01 changed the base branch from @matipl01/android-css-opacity-transitions to @matipl01/android-css-frame-pump-engine August 3, 2026 09:22
@MatiPl01 MatiPl01 changed the title perf: Drive Android CSS platform transitions from a single frame pump perf: Intern easings and route properties by id across the transition JNI Aug 3, 2026
…/android-css-transition-frame-pump

# Conflicts:
#	packages/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/css/CSSPlatformTransitionsManager.kt
@MatiPl01

Copy link
Copy Markdown
Contributor Author

Superseded by #10169, which applies the same interning on top of the mount-gated repair (#10168) and below the frame pump (#10170).

@MatiPl01 MatiPl01 closed this Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant