Skip to content

test(performance): cover renderer mounts, updates and interactions - #774

Draft
hannojg wants to merge 15 commits into
hannojg/fork-performance-checkfrom
hannojg/nitro-performance-bench
Draft

hannojg wants to merge 15 commits into
hannojg/fork-performance-checkfrom
hannojg/nitro-performance-bench

Conversation

@hannojg

@hannojg hannojg commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

The release comparison in #750 measures MMKV and React commits. This adds four renderer tests to the same APKs and runs them for internal PRs and the reviewed fork check in #773.

  • Mount a tree with 256 rows and verify every native label.
  • Update 64 retained views over 31 commits and verify their identity and final properties.
  • Send 29 edits through the Android input connection and verify the transformed text and callbacks.
  • Drag a native scroll view over 48 moves, verify its offset and record the fraction of frames that missed their Android deadline.

PerfKit measures mounts and updates on the Hermes thread and the interactions on the Android main thread. The CI status passes when all 13 simultaneous intervals rule out a regression above 5% in time or CPU work, or five percentage points in scroll jank. Incomplete coverage and intervals that still admit a meaningful regression need review.

In an A/A comparison on one ARM64 Android 15 ADC device, all 640 Harness tests passed and all 768 thread windows had complete counter coverage. The 64 pairs took 13 min 23 s. Identical code fell within the regression margins on 11 of 13 metrics. Update elapsed time [−7.46%, +13.78%] and text input cycles [−0.55%, +6.63%] left the overall check at needs review.

On December 3, I repeated A/A on Nitro UI 9c13ee89 using the adapter packed from PerfKit PR #8. The 64 pairs took 13 min 54 s on one ARM64 Android 15 ADC device. All 640 tests passed, and all 768 thread windows had full hardware-counter coverage. Eleven of 13 metrics were inside the two-sided equivalence band. Mount elapsed time [−5.15%, +4.92%] also ruled out a slowdown above 5%. Only update elapsed time, +0.02% [−12.45%, +6.54%], left the check at needs review.

I also tested a candidate with a 35 ms main-thread delay on every native scroll move. Both APKs were re-signed and ran through the fork workflow's prebuilt-APK entry point. In 24 pairs (5 min 7 s), scroll jank increased 29.59 percentage points [+26.53, +35.71] and scroll duration increased 10.55% [+9.96%, +12.13%]. Both triggered the regression status.

The contribution guide and AGENTS.md describe how to add coverage for a new or previously uncovered runtime feature.

@vercel

vercel Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
nitro-ui-docs Ready Ready Preview Dec 3, 2026 3:35pm UTC
react-nitro-docs Ready Ready Preview Dec 3, 2026 3:35pm UTC

Request Review

@hannojg
hannojg added this pull request to stack #775 November 30, 2026 15:30
…ormance-bench

# Conflicts:
#	.github/workflows/fork-performance.yml
#	scripts/performance/README.md
…ormance-bench

# Conflicts:
#	scripts/performance/README.md
@hannojg

hannojg commented Dec 1, 2026

Copy link
Copy Markdown
Member Author

In a Release build, render a host view followed by a sibling that suspends on a pending promise, both inside the same Suspense boundary. Let the fallback commit, then render null into the same root. Repeat five times, keeping only weak references to the host views created by the abandoned renders. After forcing GC, assert that zero of those views are still alive.

With the production reconciler and fake native views, this retained 5 of 5 abandoned views before #878 and 0 of 5 with the fix.

@hannojg hannojg added area: renderer area: testing Test infrastructure and CI performance Performance improvements, profiling, and benchmarks triage: ai triaged AI classification is complete labels Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: renderer area: testing Test infrastructure and CI performance Performance improvements, profiling, and benchmarks triage: ai triaged AI classification is complete

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant