Add tracing instrumentation to shared animation backend#56778
Open
bartlomiejbloniarz wants to merge 4 commits into
Open
Add tracing instrumentation to shared animation backend#56778bartlomiejbloniarz wants to merge 4 commits into
bartlomiejbloniarz wants to merge 4 commits into
Conversation
Summary: Pull Request resolved: #56468 Wire the delegate chain for batched animated property updates through UIManager, Scheduler, and the platform-specific SurfaceManagers. iOS and CxxPlatform get no-op stubs. Gated behind the `optimizedAnimatedPropUpdates` feature flag, so this change has no behavioural impact when the flag is off. Changelog: [Android][Added] - Add a batched animated prop update path that applies all pending C++ animation backend updates via a single mount item (gated by `optimizedAnimatedPropUpdates`) Differential Revision: D101157453
Summary: Pack animated property updates into a compact byte+double buffer format in C++ and add the corresponding Java-side buffer decoder. This avoids per-property JNI calls by batching all updates into a single cross-boundary transfer. Gated behind the `optimizedAnimatedPropUpdates` feature flag. Changelog: [Android][Changed] - Pack animated prop updates from the C++ animation backend into a single byte+double buffer instead of issuing one JNI call per property (gated by `optimizedAnimatedPropUpdates`) Differential Revision: D101157452
Summary: Add an iOS-optimized code path that passes typed AnimatedProps directly through the delegate chain, avoiding the folly::dynamic serialization round-trip. Android and CxxPlatform get no-op stubs. Gated behind the `optimizedAnimatedPropUpdates` feature flag. Changelog: [iOS][Added] - Add a direct AnimatedProps update path through `RCTScheduler` / `RCTMountingManager` that bypasses the folly::dynamic serialization round-trip (gated by `optimizedAnimatedPropUpdates`) Differential Revision: D101157449
Summary: Add TraceSection annotations to the shared animated backend so the work it performs becomes visible in systrace / Perfetto / Android Studio System Trace captures. Instrumented entry points: - AnimationBackend::onAnimationFrame - AnimationBackend::applySurfaceUpdates - AnimationBackend::commitUpdates - AnimationBackend::synchronouslyUpdateProps and its three platform variants (Buffered, Unbuffered, WithAnimatedProps) - AnimationBackend::requestAsyncFlushForSurfaces - AnimationBackendCommitHook::shadowTreeWillCommit - AnimatedPropsRegistry::update - AnimatedPropsRegistry::getMap Each section includes contextual args (surfaceId / surface count / update count) where available to make traces easier to correlate when investigating animation perf. Changelog: [General][Added] - Add `TraceSection` instrumentation to the shared animation backend so its work shows up in systrace / Perfetto / Android Studio System Trace captures Reviewed By: christophpurrer Differential Revision: D102800179
|
@bartlomiejbloniarz has exported this pull request. If you are a Meta employee, you can view the originating Diff in D102800179. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Add TraceSection annotations to the shared animated backend so the work it performs becomes visible in systrace / Perfetto / Android Studio System Trace captures.
Instrumented entry points:
(Buffered, Unbuffered, WithAnimatedProps)
Each section includes contextual args (surfaceId / surface count / update count) where available to make traces easier to correlate when investigating animation perf.
Changelog:
[General][Added] - Add
TraceSectioninstrumentation to the shared animation backend so its work shows up in systrace / Perfetto / Android Studio System Trace capturesReviewed By: christophpurrer
Differential Revision: D102800179