peachsim 0.1.1738 → 0.1.1744
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/cli/app-catalog.ts +47 -23
- package/cli/app-fonts.ts +19 -1
- package/cli/command-registry.ts +3 -0
- package/cli/commands/control.ts +67 -16
- package/cli/commands/device.ts +3 -1
- package/cli/commands/doctor.ts +1 -4
- package/cli/commands/inspect/settling.ts +6 -1
- package/cli/commands/inspect/wait-ready.ts +22 -2
- package/cli/commands/package.ts +22 -20
- package/cli/commands/push.ts +56 -0
- package/cli/commands/serve.ts +9 -0
- package/cli/commands/shell-url.ts +37 -9
- package/cli/commands/swift.ts +1 -1
- package/cli/current-sim.ts +27 -0
- package/cli/drivers/linux-browser-libs.lock.json +323 -1
- package/cli/drivers/linux-browser-libs.ts +8 -6
- package/cli/drivers/playwright.ts +5 -1
- package/cli/internal-child.ts +11 -1
- package/cli/main.ts +6 -0
- package/cli/native-input.ts +1 -7
- package/cli/outbound-endpoints.ts +9 -1
- package/cli/packaged-app-launcher.ts +3 -1
- package/cli/scene-video.ts +4 -0
- package/cli/ws-bridge.ts +3 -1
- package/detox/index.ts +9 -4
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +7372 -3675
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +22 -8
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +6340 -3064
- package/dist-lib/expo-swift-metadata.cjs +14 -2
- package/dist-lib/expo-swift-metadata.mjs +14 -2
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +6524 -2720
- package/dist-lib/host/fetch-proxy-handler.cjs +8 -7
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +6 -3
- package/dist-lib/index.cjs +97 -31
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +71 -29
- package/dist-lib/native-app-identity-project.cjs +53 -22
- package/dist-lib/native-app-identity-project.mjs +53 -22
- package/dist-lib/native-app-identity.cjs +10 -3
- package/dist-lib/native-app-identity.mjs +10 -3
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +25 -23
- package/dist-lib/public-origins-lib.json +111 -79
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +4 -1
- package/dist-lib/sdk.mjs +4 -1
- package/dist-lib/skills.cjs +40549 -37613
- package/dist-lib/swift-compile.cjs +2054 -388
- package/dist-lib/swift-compile.mjs +1976 -312
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +68 -8
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +5867 -2646
- package/dist-lib/vite.cjs +18 -8
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-compat/src/stubs/screen-transition-math.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/cli-companion.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/canvaskit-renderer.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +0 -3
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/engine/paint-boundary.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +25 -3
- package/dist-types/packages/peach-engine/src/engine/scroll-platform.d.ts +1 -15
- package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +1 -3
- package/dist-types/packages/peach-engine/src/engine/text-first-baseline.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +23 -0
- package/dist-types/packages/peach-engine/src/ios/chrome-metrics.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/metro-identity-contract.d.ts +33 -0
- package/dist-types/packages/peach-engine/src/preview/bundle-layout.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/remote-stream/scene-recording.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-gpu.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/render-worker/metro-bundle-metadata.d.ts +28 -0
- package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +21 -1
- package/dist-types/packages/peach-engine/src/render-worker/prepared-boot-bundle.d.ts +7 -0
- package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +8 -0
- package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +5 -0
- package/dist-types/packages/peach-engine/src/render-worker/test-bridge-protocol.d.ts +3 -3
- package/dist-types/packages/peach-engine/src/render-worker/webgpu-frame-transaction.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/webgpu-readback-scheduler.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/rolldown-bundle-inventory.d.ts +8 -1
- package/dist-types/packages/peach-engine/src/rolldown-production-fingerprint.d.ts +1 -4
- package/dist-types/packages/peach-engine/src/rolldown-production-module.d.ts +12 -0
- package/dist-types/packages/peach-engine/src/rolldown-production-roles.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/settings/devices.d.ts +6 -1
- package/dist-types/packages/peach-engine/src/settings/duo-fold-bus.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/shell-events.d.ts +4 -0
- package/dist-types/packages/peach-kit/src/capabilities.d.ts +7 -0
- package/package.json +2 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h +1 -0
- package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetworkErrors.h +257 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFByteOrder.h +305 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +2 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGAffineTransform.h +204 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h +260 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColor.h +164 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorConversionInfo.h +101 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h +510 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h +1132 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGConvertColorDataWithFormat.h +34 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDataConsumer.h +83 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDataProvider.h +197 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGEXRToneMappingGamma.h +36 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGError.h +38 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGFont.h +312 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGFunction.h +106 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGGradient.h +123 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGITUToneMapping.h +31 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGImage.h +409 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGLayer.h +78 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h +120 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContentStream.h +55 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h +535 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h +133 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h +252 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFMarkedContentItem.h +37 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFObject.h +67 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFOperatorTable.h +51 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h +101 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFScanner.h +123 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStream.h +44 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFString.h +52 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStructureElement.h +87 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPath.h +441 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPattern.h +89 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGRenderingBufferProvider.h +49 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGShading.h +124 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGToneMapping.h +85 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +44 -252
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Modules/module.modulemap +1 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/CFNetworkErrors.h +257 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes +0 -6
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +356 -61
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/NSURLSession+Network.h +32 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/Network.h +51 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/advertise_descriptor.h +193 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browse_descriptor.h +163 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browse_result.h +207 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browser.h +285 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection.h +714 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection_group.h +629 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection_report.h +932 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/content_context.h +229 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/endpoint.h +390 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/error.h +135 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ethernet_channel.h +349 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/framer_options.h +1187 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/group_descriptor.h +184 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/interface.h +150 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ip_options.h +351 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/listener.h +438 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/nw_object.h +200 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/parameters.h +1205 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/path.h +392 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/path_monitor.h +216 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/privacy_context.h +188 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/protocol_options.h +126 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/proxy_config.h +357 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/quic_options.h +889 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/resolver_config.h +94 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/tcp_options.h +459 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/tls_options.h +115 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/txt_record.h +432 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/udp_options.h +112 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ws_options.h +743 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Modules/module.modulemap +9 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAAnimation.h +395 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CABase.h +132 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CADisplayLink.h +107 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterCell.h +153 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterLayer.h +151 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAFrameRateRange.h +40 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAGradientLayer.h +78 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h +1078 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTiming.h +97 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTimingFunction.h +67 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAReplicatorLayer.h +65 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAScrollLayer.h +64 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAShapeLayer.h +135 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATextLayer.h +99 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATiledLayer.h +67 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransaction.h +124 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransform3D.h +138 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransformLayer.h +40 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAValueFunction.h +78 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h +19 -38
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h +1757 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSAttributedString.h +19 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSParagraphStyle.h +28 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityConstants.h +114 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h +16 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIBarAppearance.h +47 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDataDetectors.h +20 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDatePicker.h +13 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDevice.h +16 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIEvent.h +84 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizer.h +119 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizerSubclass.h +66 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIHoverGestureRecognizer.h +45 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +161 -37
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIPickerView.h +76 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabBar.h +8 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabBarAppearance.h +78 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITextInputTraits.h +29 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITouch.h +104 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITraitCollection.h +19 -0
- package/sdk/ios/usr/include/dns_sd.h +3616 -0
- package/sdk/ios/usr/include/dnssd.modulemap +4 -0
- package/sdk/ios/usr/include/module.modulemap +1 -0
- package/sdk/ios/usr/include/sys/socketvar.h +191 -0
- package/sdk/ios/usr/include/sys/vsock.h +84 -0
- package/sdk/native-hashes.json +1 -1
- package/skills/contrast/SKILL.md +6 -5
- package/skills/peach-debug/SKILL.md +68 -264
- package/skills/peach-debug/references/accessibility.md +37 -73
- package/skills/peach-debug/references/commands.md +2 -2
- package/skills/peach-debug/references/events.md +74 -0
- package/skills/peach-perf/SKILL.md +64 -401
- package/skills/peach-perf/references/presentation.md +46 -0
- package/skills/peach-perf/references/profiling.md +93 -0
- package/skills/peach-perf/references/render-counters.md +57 -0
- package/skills/peach-setup/SKILL.md +66 -216
- package/skills/peach-setup/references/native-config.md +35 -0
- package/skills/peach-setup/references/reporting.md +28 -0
- package/skills/peach-test/SKILL.md +68 -284
- package/skills/peach-test/references/detox.md +69 -0
- package/skills/peach-test/references/maestro.md +95 -0
- package/skills/peach-visual/SKILL.md +53 -105
- package/src/appPackageContract.ts +12 -1
- package/src/assetCatalogContract.ts +8 -1
- package/src/bridge-contract.ts +6 -0
- package/src/bundle-channel.mjs +133 -59
- package/src/cli-runtime.ts +8 -9
- package/src/configured-bundle-producer.ts +10 -0
- package/src/device-catalog.ts +68 -4
- package/src/expo-discovery-cache.ts +3 -0
- package/src/expo-native-workspace.ts +81 -17
- package/src/expo-swift-host.ts +57 -104
- package/src/expo-widget-assets.ts +76 -0
- package/src/expoSwiftContract.ts +13 -1
- package/src/host/websocket-proxy.ts +7 -2
- package/src/native-prebuilt.ts +3 -3
- package/src/nitro-adapter.lock.json +263 -263
- package/src/nitro-adapter.ts +69 -7
- package/src/nitro-bundle.ts +52 -24
- package/src/nitro-compile.ts +6 -1
- package/src/nitro-source.ts +82 -4
- package/src/nitro-superset.lock.json +103 -0
- package/src/nitro-superset.ts +137 -0
- package/src/nitroContract.ts +5 -1
- package/src/react-bridge-importers.ts +1 -0
- package/src/settingsContract.ts +26 -1
- package/src/swift-compile.ts +267 -68
- package/src/swift-compiler-digest.ts +2 -0
- package/src/swift-coverage/xcode-packages.ts +61 -1
- package/src/swift-coverage/xcode.ts +10 -12
- package/src/swift-cxx-reachable.ts +1 -1
- package/src/swift-distribution.lock.json +15 -13
- package/src/swift-distribution.ts +57 -26
- package/src/swift-host.ts +48 -35
- package/src/swift-link-roots.ts +45 -18
- package/src/swift-objc-compile.ts +78 -2
- package/src/swift-objc-standin.ts +3 -0
- package/src/swift-shared-sdk.ts +85 -1
- package/src/swift-standins.ts +233 -11
- package/src/swift-submit.ts +13 -1
- package/src/swift-toolchain.ts +82 -7
- package/src/swift-wasm-prune.ts +1629 -0
- package/src/turbo-bundle.ts +11 -10
- package/src/turbo-runtime.lock.json +16 -16
- package/src/vite-plugin-one.ts +12 -1
- package/src/vite-plugin.ts +82 -23
- package/src/wasm-optimize.ts +34 -0
- package/src/worker-system-chunks.ts +3 -3
- package/src/xcode-project.ts +52 -0
- package/src/xcode-target-members.ts +12 -1
|
@@ -1,427 +1,90 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: peach-perf
|
|
3
|
-
description:
|
|
3
|
+
description: Diagnose and optimize measured scroll jank, dropped frames, animation latency, idle CPU, or memory growth in an app running in Peach. Use for performance profiling and before/after comparisons; use peach-debug for general rendering or interaction bugs and peach-setup for connection problems.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Peach performance
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
counters that prove machinery engaged, fix the one thing the counters
|
|
12
|
-
indict, remeasure — and every wasted week came from skipping a step.
|
|
8
|
+
Start with a connected, pinned sim (`peach describe` returns your app). Use
|
|
9
|
+
`peach-setup` if it does not. Identify the slow interaction and reproduce it
|
|
10
|
+
before changing code.
|
|
13
11
|
|
|
14
|
-
|
|
15
|
-
> triage lives in `/peach-debug`; this skill goes deeper on perf only.
|
|
12
|
+
## Measure the cause
|
|
16
13
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
for hours and never meet the cause.
|
|
25
|
-
|
|
26
|
-
1. **measure the worker that painted it, in the right browser.** the tenant
|
|
27
|
-
hasn't painted since the two-worker split, so never read a tenant sampler
|
|
28
|
-
(the one reporting `avg 0.48ms (2069 fps)` for a visibly janky scroll was
|
|
29
|
-
removed). but "the shell" is no longer the whole answer either: the
|
|
30
|
-
compositor worker owns `home`, `app:one` and `app:two`, so **every guest-app
|
|
31
|
-
draw call, paint boundary and raster-tier decision is in the compositor's
|
|
32
|
-
render profile, not the shell's.** `perf shell stop` prints both, labelled
|
|
33
|
-
by worker — read the compositor block for anything inside an app. for
|
|
34
|
-
months it printed only the shell's, and a dense token-list fling
|
|
35
|
-
therefore reported `raster tier: 0 promotions / 0 blits` while the
|
|
36
|
-
compositor was blitting ~14 rows a frame; the giveaway was `node visits: 7`
|
|
37
|
-
next to `app:one 1014 paints`. if a render-profile block describes a
|
|
38
|
-
handful of nodes while an app surface is painting hundreds of times, you
|
|
39
|
-
are reading the wrong worker.
|
|
40
|
-
browser matters just as much: playwright's bundled headless chromium has
|
|
41
|
-
NO GPU — CanvasKit falls back to software rendering and every number lies
|
|
42
|
-
high. launch a dedicated GPU-backed Chrome executable with a disposable
|
|
43
|
-
profile and an owning process supervisor that terminates its exact process
|
|
44
|
-
tree. never automate the user's own browser profile.
|
|
45
|
-
2. **machinery silently not engaging is the default failure mode.** the
|
|
46
|
-
raster tier compiled, gated, and did *nothing* for months — zero
|
|
47
|
-
promotions on its textbook case — until per-gate rejection counters
|
|
48
|
-
existed. the frame-demand gate was blind to commit storms. the vsync
|
|
49
|
-
pump flapped 100 msgs/s at rest. never assume a tier works because it's
|
|
50
|
-
wired; read its counter during the exact workload.
|
|
51
|
-
3. **check reclaimable memory and sampled CPU before blaming code.** an OOM or
|
|
52
|
-
busy machine mimics every perf and infra failure. on macOS, read
|
|
53
|
-
`memory_pressure -Q` and take multiple `iostat -c 3` CPU samples; on Linux,
|
|
54
|
-
read `MemAvailable` from `/proc/meminfo` and sample CPU idle over time. keep
|
|
55
|
-
the busiest sample. raw macOS `freemem()` and load average are not admission
|
|
56
|
-
signals. attribute browser processes with `ps -eo pid,ppid,args` before
|
|
57
|
-
treating one as abandoned or stopping an exact pid.
|
|
58
|
-
4. **never trade animation fidelity for CPU.** perpetual sub-frame animation
|
|
59
|
-
must keep its authored cadence. attack per-frame cost (layers, caching,
|
|
60
|
-
damage), never cadence or fidelity.
|
|
14
|
+
```sh
|
|
15
|
+
peach version
|
|
16
|
+
peach perf shell start
|
|
17
|
+
# reproduce the slow interaction
|
|
18
|
+
peach perf shell stop --json
|
|
19
|
+
peach get errors 5
|
|
20
|
+
```
|
|
61
21
|
|
|
62
|
-
|
|
22
|
+
Read the **compositor** render-profile block for guest-app painting, boundaries,
|
|
23
|
+
and raster decisions. Shell and tenant statistics alone do not describe app
|
|
24
|
+
paint cost. If a report visits only a handful of nodes during a dense app
|
|
25
|
+
scroll, check which worker it describes.
|
|
63
26
|
|
|
64
|
-
|
|
27
|
+
Compare painted-frame count, layout/render/flush costs, p95, worst frames, and
|
|
28
|
+
cadence. A low cost per painted frame can hide missing frames. The frame budget
|
|
29
|
+
is about 8.3 ms at 120 Hz or 16.7 ms at 60 Hz. Use the actual display cadence;
|
|
30
|
+
a single p95 is insufficient evidence of an improvement.
|
|
65
31
|
|
|
66
|
-
|
|
67
|
-
Start from either, interact with the app, then Stop from either. The saved
|
|
68
|
-
category choice is used unless the command supplies a preset or category list:
|
|
32
|
+
For a timeline linked to animations, interactions, network, and logs:
|
|
69
33
|
|
|
70
34
|
```sh
|
|
71
35
|
peach perf record start --preset default
|
|
36
|
+
# reproduce
|
|
72
37
|
peach perf record status --json
|
|
73
38
|
peach perf record stop -o /tmp/app.profile.jsonl.gz
|
|
74
39
|
```
|
|
75
40
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
times with a Default run. A recording retains its last five minutes and
|
|
81
|
-
reports gaps when frame coverage is lost. Stop releases its profiling resources.
|
|
82
|
-
Save writes the preview timeline’s gzip JSONL format. Open reads it, plain
|
|
83
|
-
JSONL, or a CLI JSON profile; a `.json` CLI output keeps the JSON form. Both
|
|
84
|
-
forms include frame columns, animation spans, discrete events, missed display
|
|
85
|
-
ticks and optional value samples. Upload shares the profile alongside the
|
|
86
|
-
currently loaded app through the preview uploader. This is a diagnostic capture; use the independent
|
|
87
|
-
presentation evidence below to make smoothness claims.
|
|
88
|
-
|
|
89
|
-
### presentation proof must stay outside the simulator
|
|
90
|
-
|
|
91
|
-
Performance acceptance must not use `peach record`, `liveComposite`,
|
|
92
|
-
`captureBitmaps`, Chrome screencast, or another in-page frame-copy path. Those
|
|
93
|
-
paths add work to the simulator or browser and can change the cadence being
|
|
94
|
-
measured. Record the visible window with the operating system's native screen
|
|
95
|
-
capture instead.
|
|
96
|
-
|
|
97
|
-
Use an operating-system-owned window recorder. Target the exact browser window
|
|
98
|
-
rather than the display when the platform supports it, start recording before
|
|
99
|
-
normal user input, preserve the movie, and record the operating system and
|
|
100
|
-
recorder version. Confirm that the recorder process, not the browser or
|
|
101
|
-
simulator, owns capture and encoding. If native window capture is unavailable,
|
|
102
|
-
report the proof as blocked instead of substituting an in-page capture path.
|
|
41
|
+
Start and stop also work in the devtools Performance tab. React, memory, and
|
|
42
|
+
Paint Detail add overhead; Paint Detail changes the rendering path. Compare
|
|
43
|
+
runs with the same categories. Read [profiling](references/profiling.md) when
|
|
44
|
+
you need categories, CPU profiles, cadence interpretation, or contention tests.
|
|
103
45
|
|
|
104
|
-
|
|
105
|
-
debug, or test bridge while it records. Treat that video as visual evidence of
|
|
106
|
-
frame progression. Collect worker paint, flush, delivery, and tier counters in
|
|
107
|
-
a separate run with screen capture off. The two runs answer different questions
|
|
108
|
-
without making the simulator measure its own recording overhead.
|
|
46
|
+
## Choose the next probe
|
|
109
47
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
48
|
+
| Observation | Investigate |
|
|
49
|
+
| --- | --- |
|
|
50
|
+
| Layout spikes during scrolling | Row materialization, layout-affecting animation, repeated commits |
|
|
51
|
+
| Boundary records approach replays | Cache invalidation, moved origins, or cold content |
|
|
52
|
+
| Raster promotions/blits stay zero | Eligibility rejection counters in the compositor block |
|
|
53
|
+
| Work cost stays low but frames disappear | Host clock, delivery lag, worker scheduling, presentation cadence |
|
|
54
|
+
| First tap or paint stalls | `peach get requests 5`, image/font loading |
|
|
55
|
+
| Memory grows while repeating a flow | `peach debug memory`, active animations, retained resources |
|
|
118
56
|
|
|
119
|
-
|
|
120
|
-
|
|
57
|
+
Read [render counters](references/render-counters.md) only when interpreting
|
|
58
|
+
cache tiers, rejection gates, idle activity, or memory cleanup. Prove the
|
|
59
|
+
existing mechanism engages before proposing another cache or fast path.
|
|
60
|
+
A promotion or blit count alone does not prove a speedup.
|
|
121
61
|
|
|
122
|
-
|
|
123
|
-
Starting a ScreenCaptureKit window capture flips the 120hz `OffscreenCanvas`
|
|
124
|
-
out of latest-wins presentation into sequential presentation, which falls behind
|
|
125
|
-
roughly 0.5ms for every 1ms of capture. A capture started mid-activity begins
|
|
126
|
-
near zero latency and climbs from there. A recording is therefore truthful about
|
|
127
|
-
content and trajectory for its whole length, and truthful about timing for
|
|
128
|
-
roughly its first 500ms; latency growth past that is the capture, not the
|
|
129
|
-
engine. Live uncaptured presentation stays latest-wins and current. Never report
|
|
130
|
-
a late-recording latency as an engine number, and never compare two recordings
|
|
131
|
-
of different lengths.
|
|
132
|
-
|
|
133
|
-
Worker counters and presentation are different claims, and a green counter never
|
|
134
|
-
licenses a smoothness claim. A capture can report a perfect 120hz worker cadence
|
|
135
|
-
for motion the user never sees move: the overscroll release shipped exactly that
|
|
136
|
-
way, with the compositor stepping on schedule while the presented frames showed
|
|
137
|
-
a clamped fling instead of the bounce spring. Counters prove a tier engaged;
|
|
138
|
-
only a framestamp decode of an out-of-process recording proves what presented.
|
|
139
|
-
|
|
140
|
-
When an external transform control is smooth but the simulator is not, inspect
|
|
141
|
-
every animation on the presented element. A separate Web Animation object does
|
|
142
|
-
not isolate paint work: animating `box-shadow`, `filter`, or another paint-only
|
|
143
|
-
property on the transform owner can move the whole trajectory to the browser's
|
|
144
|
-
main thread. Paint stable decoration once or give it a distinct layer.
|
|
62
|
+
Enable only the debug channels you need, then disable them before timing:
|
|
145
63
|
|
|
146
64
|
```sh
|
|
147
|
-
peach
|
|
148
|
-
# reproduce
|
|
149
|
-
|
|
150
|
-
peach
|
|
65
|
+
peach debug enable layout,render
|
|
66
|
+
# reproduce and inspect
|
|
67
|
+
peach debug recent layout 40
|
|
68
|
+
peach debug disable layout,render
|
|
151
69
|
```
|
|
152
70
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
tier is not firing; `raster skips` names the first gate each candidate
|
|
174
|
-
failed (rebuild / animated / cacheable). zero blits on a feed scroll is
|
|
175
|
-
a bug, not a tuning matter — but check you are reading the compositor's
|
|
176
|
-
block first (law 1), because the shell's is legitimately zero for an app
|
|
177
|
-
workload.
|
|
178
|
-
**before widening any skip bucket, read the `also fail a later gate`
|
|
179
|
-
line under it.** the counters name only the FIRST failed gate, so a big
|
|
180
|
-
bucket can be entirely blocked a second time and unwidenable: on one dense
|
|
181
|
-
token-list fling all 8298 `animated` skips also carried a style transform
|
|
182
|
-
or a non-cacheable chunk, and narrowing the animated gate moved 6007 to
|
|
183
|
-
`transform` and 2350 to `cacheable` while promoting nothing. a bucket is
|
|
184
|
-
worth attacking when its also-blocked share is small.
|
|
185
|
-
and blits firing is not the same as the tier paying for itself: on that same
|
|
186
|
-
token list the tier blits every visible row and costs 70MB of GPU
|
|
187
|
-
cache for no frame-time change, while the retained row boundaries under it
|
|
188
|
-
cost 2.4ms a frame. the discriminator is per-row draw density, so check
|
|
189
|
-
`draw calls` in the same block before concluding a cache is earning its
|
|
190
|
-
keep.
|
|
191
|
-
- `worst frames` — read the layout/render split of each; they are usually
|
|
192
|
-
a different problem than the average.
|
|
193
|
-
|
|
194
|
-
three runs minimum; single-run p95 is noise. a fresh `perf start` between
|
|
195
|
-
runs clears the buffer.
|
|
196
|
-
|
|
197
|
-
### browser-site interaction matrices
|
|
198
|
-
|
|
199
|
-
for a browser-level regression, use three fresh documents per browser engine.
|
|
200
|
-
within each document, capture cold then warm versions of the same interaction;
|
|
201
|
-
do not call two independent fresh documents "cold versus warm." wait for the
|
|
202
|
-
home surface's first compositor paint before starting—the compositor-ready flag
|
|
203
|
-
only proves worker bootstrap and can precede the first visible layout.
|
|
204
|
-
|
|
205
|
-
during a measured transition, use a fixed observation window. do not poll the
|
|
206
|
-
shell state, test tree, or perf bridge while the animation is running; verify
|
|
207
|
-
the positive control once after profiling stops. query a targeted id or text on
|
|
208
|
-
large virtualized apps, never the full tree, because enumeration can dominate
|
|
209
|
-
or terminate the browser process. for a remotely populated list, require the
|
|
210
|
-
same scroll-container identity and content extent for a quiet window before the
|
|
211
|
-
gesture; "a row exists" can still be true while the app replaces the tree.
|
|
212
|
-
keep pointer down, moves, release, and the fixed settle window inside one
|
|
213
|
-
uninterrupted profile. stopping or querying between drag and release changes
|
|
214
|
-
velocity, cache state, and worker scheduling.
|
|
215
|
-
|
|
216
|
-
the minimum browser matrix is home drag plus snapback, a cold/warm built-in app
|
|
217
|
-
open, and a cold/warm app-switcher open. add one quiet heavy-app screen, one
|
|
218
|
-
navigation transition, and one long-list scroll when those surfaces are in
|
|
219
|
-
scope. use GPU-backed Chrome for Chromium claims. use installed WebKit in a
|
|
220
|
-
visible nonpersistent WKWebView for Safari-engine claims; Playwright WebKit is
|
|
221
|
-
not the installed Safari engine.
|
|
222
|
-
|
|
223
|
-
every receipt must carry the exact page and frame URLs, browser user agent,
|
|
224
|
-
browser executable path and content hash,
|
|
225
|
-
harness-source identity, capture time, engine build identity and generation,
|
|
226
|
-
runtime bundle receipt, sampled host capacity at run start, runtime errors, and
|
|
227
|
-
any partial failure. use the shared host-capacity sampler; do not record raw
|
|
228
|
-
`freemem()` or decide from macOS load average.
|
|
229
|
-
partial artifacts remain inadmissible until every requested run number for that
|
|
230
|
-
scenario exists with one harness, browser executable, engine, seed, and
|
|
231
|
-
viewport identity. browser
|
|
232
|
-
comparisons use the same root/target viewport tuple and backing scale. for a
|
|
233
|
-
wrapper or embedded surface, first prove the target has nonzero presented
|
|
234
|
-
geometry; a finite host viewport that responsively hides the target measures a
|
|
235
|
-
different surface. direct and embedded modes may intentionally have different
|
|
236
|
-
tuples, but browsers within one mode may not. finite but different device pixel
|
|
237
|
-
ratios are not comparable. if setup reloads only the child frame, replay the
|
|
238
|
-
parent's presentation control and wait for the new child to acknowledge it. a
|
|
239
|
-
selected parent toggle can outlive its child and is not proof of the child's
|
|
240
|
-
mode.
|
|
241
|
-
the profile intentionally blocks Graphite cache cleanup, so its cache snapshot
|
|
242
|
-
is not a terminal memory verdict. require a capture-local post-profile
|
|
243
|
-
compositor snapshot with before, after, and delta cleanup counters. an
|
|
244
|
-
over-limit profiled Context needs fresh submitted-work attempt and
|
|
245
|
-
successful-completion deltas; an over-limit profiled Recorder also needs a
|
|
246
|
-
fresh cleanup in that capture. classify Context and Recorder independently as
|
|
247
|
-
within-limit, locked-over-limit, or purgeable-over-limit; never compare their
|
|
248
|
-
aggregate, and never admit purgeable overage. a cache with zero purgeable bytes
|
|
249
|
-
can still hold a returned-resource queue: settled maintenance releases completed
|
|
250
|
-
Recorder resources, then budget enforcement evicts
|
|
251
|
-
least-recently-used overage before the next paint or resource insertion can
|
|
252
|
-
inherit the synchronous work. perpetual renderer
|
|
253
|
-
animation is not finite interaction demand; finite motion, readbacks, and
|
|
254
|
-
profiling must still block cleanup.
|
|
255
|
-
the host-clock `displayFrames`/`timerFrames` and shell-link
|
|
256
|
-
`displayPumps`/`timerPumps` counters prove whether the visible-rAF fallback
|
|
257
|
-
engaged. preserve failed receipts instead of retrying them out of the data set.
|
|
258
|
-
|
|
259
|
-
### confirm which build you measured, every time
|
|
260
|
-
|
|
261
|
-
Record the CLI and runtime versions with `peach version`. For a development
|
|
262
|
-
build, include a build marker in the capture and verify it after reloading.
|
|
263
|
-
An A/B measurement must identify each build from its own output.
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
deeper tools when the frame report isn't enough:
|
|
267
|
-
|
|
268
|
-
```sh
|
|
269
|
-
peach maestro test .maestro/scroll.yaml --profile # per-step + frame stats
|
|
270
|
-
peach perf cpu --duration 5 --output /tmp/t.cpuprofile # sampled CPU
|
|
271
|
-
peach open 8089 --new --driver playwright --cdp-port 9222 # cpu-profile a driveable sim
|
|
272
|
-
peach debug enable layout,render && peach debug recent layout 40
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
`peach perf cpu` writes one profile for the page and one for every attached
|
|
276
|
-
worker, plus a manifest that labels shell, compositor, tenant, worklet, and
|
|
277
|
-
unknown workers. exit zero requires page, shell, compositor, and tenant plus
|
|
278
|
-
every other discovered target, with each covering at least 99% of the requested
|
|
279
|
-
window. inspect start/stop offsets as well as sample counts; a late-attached
|
|
280
|
-
near-empty profile is incomplete. a profile of only the tenant—or a helper
|
|
281
|
-
that relabels the busiest worker as tenant—cannot distinguish CPU saturation
|
|
282
|
-
from sparse browser scheduling.
|
|
283
|
-
|
|
284
|
-
for an automated interaction, pass `--interaction-barrier` and start the cpu
|
|
285
|
-
command during the runner's pre-workload attachment delay, and give the runner
|
|
286
|
-
a post-workload delay long enough to remain open through profiler stop. the
|
|
287
|
-
pre-workload delay alone is not synchronization: it can end the profile while
|
|
288
|
-
the workload is still preparing. barrier mode pauses the workload before its
|
|
289
|
-
first measured capture until every discovered target is profiling, then rejects
|
|
290
|
-
the manifest unless the workload publishes its completion marker, every expected
|
|
291
|
-
capture label, and action timestamps inside the capture interval. retain its
|
|
292
|
-
browser executable, engine build and generation, root and target viewports, and
|
|
293
|
-
workload source identity in the CPU manifest. the barrier also has a bounded
|
|
294
|
-
page-side lease so an interrupted
|
|
295
|
-
profiler cannot strand the workload; lease expiry releases the runner but
|
|
296
|
-
invalidates the profile.
|
|
297
|
-
|
|
298
|
-
### the cadence block: frames that never happened
|
|
299
|
-
|
|
300
|
-
work-per-painted-frame cannot see a frame that was never delivered because a
|
|
301
|
-
worker was descheduled or its resilient clock fell back late. the report shows
|
|
302
|
-
low avg and zero jank while the user sees stutter.
|
|
303
|
-
the `cadence` section of `perf shell stop` measures the delivery side and
|
|
304
|
-
attributes a missing frame to its hop:
|
|
305
|
-
|
|
306
|
-
- `display clock / host rAF interval` — stretch here (gaps >1.5x median)
|
|
307
|
-
means the page thread's rAF starved or was throttled, upstream of the
|
|
308
|
-
shell worker entirely.
|
|
309
|
-
- `delivery lag` — vsync postMessage receipt latency above the run's
|
|
310
|
-
best case; jitter here means the shell worker was descheduled or its
|
|
311
|
-
queue was busy.
|
|
312
|
-
- `present interval` — intervals between admitted compositor presentations,
|
|
313
|
-
including native frames, while progress remains pending after the preceding
|
|
314
|
-
presentation (`motionPending` in `compositorCadence.frameSeries`). Settled
|
|
315
|
-
admitted frames end a sequence; deferred frames retain the pending gap.
|
|
316
|
-
`paintIntervals` reports the sample count, so zero samples do not prove
|
|
317
|
-
smoothness. Shell work and JavaScript flushes can park while native frames
|
|
318
|
-
continue presenting.
|
|
319
|
-
- `idle breaks` — host gaps >250ms, excluded from host interval statistics.
|
|
320
|
-
|
|
321
|
-
the compositor `compositorHostFrameClock` keeps its historical name and reports
|
|
322
|
-
display/timer ticks consumed by the compositor worker's resilient clock during
|
|
323
|
-
the acknowledged profile window. `published` is null because renderer-main no
|
|
324
|
-
longer publishes compositor frames. sparse consumed ticks with low production
|
|
325
|
-
time identifies worker scheduling starvation. many consumed ticks with sparse
|
|
326
|
-
paints can be legitimate dirty-gating; correlate the frame series before
|
|
327
|
-
treating it as a regression. Host and shell delivery statistics come from the
|
|
328
|
-
shell worker; `cadence.paintInterval*` comes from compositor presentation times
|
|
329
|
-
during motion.
|
|
330
|
-
|
|
331
|
-
compare baseline vs contended captures of the same scripted window; also
|
|
332
|
-
compare **painted-frame counts**, the crudest and most robust signal.
|
|
333
|
-
|
|
334
|
-
the compositor cadence lines separate worker delivery from work submitted by
|
|
335
|
-
the worker:
|
|
336
|
-
|
|
337
|
-
- `engine-empty rAF` includes only sustained intervals where adjacent frames
|
|
338
|
-
have no engine demand, input message, shared-slot demand epoch change,
|
|
339
|
-
paint, prewarm pass, or CanvasKit flush.
|
|
340
|
-
- `rAF with CanvasKit flush` and `rAF after CanvasKit flush` isolate the frame
|
|
341
|
-
that called `Surface.flush()` and the next delivered frame.
|
|
342
|
-
- `CanvasKit submission` measures intervals between final `Surface.flush()`
|
|
343
|
-
completions on frames that submitted at least one surface. The JSON
|
|
344
|
-
`frameSeries` preserves each phase flag and exact count for correlation.
|
|
345
|
-
|
|
346
|
-
these are engine-owned boundaries. Playwright exposes raw CDP sessions only
|
|
347
|
-
for Chromium, and WebKit's public Inspector timeline exposes a WebCore
|
|
348
|
-
`Composite` record without a RemoteLayerTree transaction id or commit event.
|
|
349
|
-
Do not label CanvasKit flush or compositor rAF as a RemoteLayerTree commit.
|
|
350
|
-
|
|
351
|
-
## the contention harness ("smooth alone, laggy on a zoom call")
|
|
352
|
-
|
|
353
|
-
low-load numbers do not predict feel under real-world CPU pressure. run the
|
|
354
|
-
same scripted capture twice, once with synthetic load, self-terminating so
|
|
355
|
-
it can't leak:
|
|
356
|
-
|
|
357
|
-
```sh
|
|
358
|
-
# 6 cores of load for 30s, self-terminating
|
|
359
|
-
for i in 1 2 3 4 5 6; do
|
|
360
|
-
(perl -e 'my $end=time()+30; while(time()<$end){my $x=0; $x+=rand() for 1..10000}' &)
|
|
361
|
-
done
|
|
362
|
-
```
|
|
363
|
-
|
|
364
|
-
compare: painted-frame count (cadence), avg/p95 (work), layout spikes. the
|
|
365
|
-
diagnostic split:
|
|
366
|
-
|
|
367
|
-
- **work grows under load** (avg/p95 way up) → paint path too heavy;
|
|
368
|
-
attack per-frame cost (layers, damage, raster, draw calls).
|
|
369
|
-
- **work flat but frames missing** (counts drop, avg barely moves) →
|
|
370
|
-
delivery starvation: the host-rAF → postMessage → shell hop chain and
|
|
371
|
-
worker scheduling. browsers give no thread priorities, so the only
|
|
372
|
-
levers are fewer hops on the frame-critical path, less work per hop, and
|
|
373
|
-
keeping motion (scroll, native anims) as close to the paint site as
|
|
374
|
-
possible.
|
|
375
|
-
- also remember GPU contention is real (video calls encode on the GPU);
|
|
376
|
-
webkit-lane numbers are Metal, chrome numbers are its GL/Metal stack.
|
|
377
|
-
|
|
378
|
-
## the perf machinery map (improve, don't reinvent)
|
|
379
|
-
|
|
380
|
-
every tier below exists and has a counter. before optimizing, identify
|
|
381
|
-
which tier *should* absorb your cost and prove whether it does.
|
|
382
|
-
|
|
383
|
-
| tier | what it absorbs | proof it engaged |
|
|
384
|
-
| --- | --- | --- |
|
|
385
|
-
| demand-gated frames + visibility re-marking | idle costs nothing; invisible animations quiesce | `+N skipped idle ticks`; `queryStats().needsVsync` false at rest |
|
|
386
|
-
| per-surface dirty scoping | one app's commit/animation repaints only its surface | idle repaints ≈ commit rate, owning surface only |
|
|
387
|
-
| dirty-tracked layout + tiered text measurement | color/opacity/transform commits skip yoga; repeated strings skip shaping | `layout: 0` on steady frames |
|
|
388
|
-
| layer compositor (`paint-boundary.ts`) | animating a child never re-records ancestors | replays >> records |
|
|
389
|
-
| idle boundary pre-record | the first drag replays instead of recording; cold records happen while the surface is quiet | `pre-recorded: N boundaries at idle` in the report, and the first interaction's record cost near its warm cost |
|
|
390
|
-
| damage rects (`damage-rect.ts`) | repaint clips to changed region (opaque-backdrop gated) | worst-frame render bounded during small updates |
|
|
391
|
-
| raster tier | stable rows become GPU textures; scroll skips recording | compositor block: promotions > 0 once warm, blits ≈ one per visible row on a dense feed |
|
|
392
|
-
| flood guard, pointer coalescing, vsync hysteresis | message-storm and pump-thrash protection | msgs/s sane during gestures and at rest |
|
|
393
|
-
| worker-owned resilient frame clocks | renderer-main stalls do not stop shell or compositor motion | compositor consumed display/timer frames plus shell worker frame and paint cadence |
|
|
394
|
-
|
|
395
|
-
there is no whole-screen scroll blit. one existed for a few hours in June
|
|
396
|
-
2026 and was reverted (`6706f3a014`): it shifted a surface RECTANGLE, so a
|
|
397
|
-
full-surface feed with floating translucent chrome dragged its bars along with
|
|
398
|
-
the content and smeared their old pixels through the feed. scroll rides the
|
|
399
|
-
layer, damage, and raster machinery above instead, and any future blit has to
|
|
400
|
-
own a scroll SUBTREE with provable backdrop correctness rather than a screen
|
|
401
|
-
rect. do not look for `blitBlocked`; it does not exist.
|
|
402
|
-
|
|
403
|
-
if a workload's cost lands in a tier that shows zero activity, the fix is
|
|
404
|
-
almost always "why didn't it engage" (a gate, a shape, an eligibility
|
|
405
|
-
rule), not new machinery. the area-gate fix that finally made the raster
|
|
406
|
-
tier fire on feeds came entirely from rejection counters.
|
|
407
|
-
|
|
408
|
-
## guest-app-side causes (fix the app, or fix the engine honestly)
|
|
409
|
-
|
|
410
|
-
- dynamic format strings (`` `${n} messages` ``) bust the shaping LRU —
|
|
411
|
-
split number and label into separate `<Text>` nodes.
|
|
412
|
-
- `Animated.Value` on `width`/`height` forces layout per frame — use
|
|
413
|
-
`transform` (scale/translate).
|
|
414
|
-
- per-frame React work from reanimated-style code is an engine conformance
|
|
415
|
-
bug (valid worklet apps must not commit per frame) — fix Peach core,
|
|
416
|
-
never add a divergent fast-path (upstream alignment overrides perf; see
|
|
417
|
-
the `shouldFreezeOffscreenStackContent` incident).
|
|
418
|
-
- render-storm loops (poll → remount) show up as commit-rate repaints and
|
|
419
|
-
RSS growth; check `debug state animations` and the timeline.
|
|
420
|
-
|
|
421
|
-
## closing the loop
|
|
422
|
-
|
|
423
|
-
done means: a named hot path + the counter or split that indicts it + the
|
|
424
|
-
same capture re-run showing the number moved + no new errors (`get errors`)
|
|
425
|
-
+ nothing torn down left running (close sims you opened, kill load loops).
|
|
426
|
-
for engine changes, run the affected integration tests exposed by the installed
|
|
427
|
-
Peach version and capture stable screenshots of surfaces you touched.
|
|
71
|
+
## Keep comparisons honest
|
|
72
|
+
|
|
73
|
+
- Identify each build with `peach version` and, for development builds, a build
|
|
74
|
+
marker verified after reload. Keep device, theme, viewport, scale, data,
|
|
75
|
+
browser, and workload the same between runs.
|
|
76
|
+
- Check available memory and sampled CPU before blaming app code. Use the same
|
|
77
|
+
browser and GPU configuration. Software rendering and GPU rendering produce
|
|
78
|
+
different performance results; confirm which is active.
|
|
79
|
+
- Keep the input, release, and settle interval in one uninterrupted capture.
|
|
80
|
+
Avoid tree enumeration or debug queries during the measured interaction.
|
|
81
|
+
- Optimize work per frame. Preserve animation cadence, trajectory, native
|
|
82
|
+
behavior, and app semantics. A transform can avoid layout only when it
|
|
83
|
+
preserves the intended behavior.
|
|
84
|
+
- Worker counters prove work and scheduling. For a claim about what users
|
|
85
|
+
actually see, read [presentation evidence](references/presentation.md) and
|
|
86
|
+
capture the visible window outside the simulator in a separate run.
|
|
87
|
+
|
|
88
|
+
Finish with a named cause, comparable before/after results for the same
|
|
89
|
+
interaction, and no new console errors. Stop profiling, disable channels,
|
|
90
|
+
terminate synthetic load you started, and close only sims you own.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Presentation evidence
|
|
2
|
+
|
|
3
|
+
Use this only when making claims about visible motion or presentation latency.
|
|
4
|
+
Worker counters cannot prove that a produced frame reached the display.
|
|
5
|
+
|
|
6
|
+
Record the visible browser window with an operating-system-owned recorder.
|
|
7
|
+
`peach record`, Chrome screencast, and simulator frame-copy paths add work inside
|
|
8
|
+
the measured system. Keep normal user input in the visual run and collect debug,
|
|
9
|
+
paint, delivery, and tier counters separately with screen capture off.
|
|
10
|
+
|
|
11
|
+
Target the exact window when supported. Preserve the movie, OS and recorder
|
|
12
|
+
versions, browser identity, build, device, viewport, scale, and workload. If an
|
|
13
|
+
external recorder is unavailable, state the limitation instead of presenting
|
|
14
|
+
an in-page recording as independent evidence.
|
|
15
|
+
|
|
16
|
+
For machine-readable paint identity, enable the `framestamp` debug channel
|
|
17
|
+
before capture:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
peach debug enable framestamp
|
|
21
|
+
# record externally and reproduce with normal input
|
|
22
|
+
peach debug disable framestamp
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
It draws a 23-cell barcode containing the low 20 bits of the paint's epoch
|
|
26
|
+
milliseconds. Home and app stamps sit at 45% of surface height; the shell overlay
|
|
27
|
+
uses 55% to separate keyboard/native-UI paints. A compatible decoder can identify
|
|
28
|
+
which paint each recorded frame contains. Without a decoder, use the video as
|
|
29
|
+
qualitative evidence and make no numeric presentation-latency claim.
|
|
30
|
+
|
|
31
|
+
Screen capture itself can change browser presentation. In particular,
|
|
32
|
+
ScreenCaptureKit capture can turn latest-wins presentation into sequential
|
|
33
|
+
presentation and accumulate delay during a recording. Do not attribute growing
|
|
34
|
+
late-recording latency to the engine without an independent control, or compare
|
|
35
|
+
recordings of different lengths as if capture overhead were constant.
|
|
36
|
+
|
|
37
|
+
For cross-browser comparisons, match device geometry, backing scale, data, and
|
|
38
|
+
workload. Within one document, capture cold then warm interactions; separate
|
|
39
|
+
fresh documents do not establish a cold/warm pair. Wait for visible content,
|
|
40
|
+
not only worker bootstrap. Keep pointer down, moves, release, and settling in
|
|
41
|
+
one uninterrupted observation window without bridge queries.
|
|
42
|
+
|
|
43
|
+
If an external transform control is smooth while the simulator stutters,
|
|
44
|
+
inspect every animation on the presented element. Animating `box-shadow` or
|
|
45
|
+
`filter` on the transform owner can force paint work onto the browser main
|
|
46
|
+
thread. Stable decoration on a separate layer can isolate that cost.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Profiling tools
|
|
2
|
+
|
|
3
|
+
Read this when the shell frame summary is insufficient.
|
|
4
|
+
|
|
5
|
+
## Performance timeline
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
peach perf record start --categories frames,animations,react
|
|
9
|
+
peach perf record status --json
|
|
10
|
+
peach perf record stop -o /tmp/app.profile.jsonl.gz
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Presets are `default`, `animations`, and `everything`. Without a category or
|
|
14
|
+
preset, start uses the saved Performance-tab categories. The recording retains
|
|
15
|
+
its last five minutes and reports lost frame coverage. Stop releases profiling
|
|
16
|
+
resources.
|
|
17
|
+
|
|
18
|
+
| Category | Cost |
|
|
19
|
+
| --- | --- |
|
|
20
|
+
| `frames`, `animations`, `interactions`, `network-logs` | Low |
|
|
21
|
+
| `react`, `animation-values`, `layout`, `memory` | Medium |
|
|
22
|
+
| `paint-detail` | High; changes the renderer path |
|
|
23
|
+
|
|
24
|
+
Save supports gzip JSONL; a `.json` CLI output retains JSON form. The Performance
|
|
25
|
+
tab can open these captures. Keep categories identical for timing comparisons.
|
|
26
|
+
Use `peach maestro test .maestro/scroll.yaml --profile` for per-step frame stats
|
|
27
|
+
from an existing flow.
|
|
28
|
+
|
|
29
|
+
## Sampled CPU
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
peach open 8081 --new --driver playwright --cdp-port 9222
|
|
33
|
+
peach perf cpu --cdp-port 9222 --duration 5 --output /tmp/app.cpuprofile
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
This intentionally creates a separate profiling sim. Close it when finished.
|
|
37
|
+
Use an isolated browser profile, never the user's normal browser profile.
|
|
38
|
+
Confirm hardware acceleration before making GPU-performance claims.
|
|
39
|
+
|
|
40
|
+
The command writes profiles for the page and every attached worker, plus a
|
|
41
|
+
manifest identifying shell, compositor, tenant, worklet, and unknown targets.
|
|
42
|
+
Inspect coverage, start/stop offsets, and sample counts. A late-attached,
|
|
43
|
+
nearly empty worker profile cannot explain scheduling starvation. Successful
|
|
44
|
+
capture requires page, shell, compositor, tenant, and all discovered targets
|
|
45
|
+
covering at least 99% of the requested window.
|
|
46
|
+
|
|
47
|
+
`--match <substring>` filters the page URL; `--sample-interval <ms>` controls
|
|
48
|
+
sampling. See `peach perf cpu --help` for defaults.
|
|
49
|
+
|
|
50
|
+
`--interaction-barrier` is for an automated workload that implements the
|
|
51
|
+
profiler's barrier and completion markers. It pauses before measured input until
|
|
52
|
+
targets are profiling, checks action timestamps and expected capture labels,
|
|
53
|
+
and rejects incomplete coverage. An arbitrary script does not acquire this
|
|
54
|
+
synchronization simply by passing the flag. The page-side lease releases a
|
|
55
|
+
stranded workload but makes an expired capture invalid.
|
|
56
|
+
|
|
57
|
+
## Cadence
|
|
58
|
+
|
|
59
|
+
Read work cost and frame delivery together:
|
|
60
|
+
|
|
61
|
+
| Report field | Meaning |
|
|
62
|
+
| --- | --- |
|
|
63
|
+
| Host rAF interval | Display-clock delivery to the page; long gaps can indicate page throttling or starvation |
|
|
64
|
+
| Delivery lag | Receipt latency above the run's best case; jitter can indicate a busy queue or descheduled worker |
|
|
65
|
+
| Present interval | Intervals between admitted compositor presentations while motion remains pending |
|
|
66
|
+
| Idle breaks | Host gaps over 250 ms, excluded from host interval statistics |
|
|
67
|
+
|
|
68
|
+
Zero `paintIntervals` samples do not prove smoothness. Settled admitted frames
|
|
69
|
+
end a pending-motion sequence; deferred frames retain its gap. Shell JavaScript
|
|
70
|
+
flushes can park while native frames keep presenting.
|
|
71
|
+
|
|
72
|
+
`compositorHostFrameClock` counts consumed display/timer ticks in the profile
|
|
73
|
+
window. Sparse ticks with low work cost suggest scheduling starvation; many
|
|
74
|
+
ticks with few paints can be legitimate dirty gating. Correlate the frame series.
|
|
75
|
+
|
|
76
|
+
The cadence report also separates sustained engine-empty rAF intervals, frames
|
|
77
|
+
with CanvasKit flush, the following rAF, and CanvasKit submission intervals.
|
|
78
|
+
These are engine boundaries, not operating-system display commits. Never label
|
|
79
|
+
a CanvasKit flush as proof that the browser presented that frame.
|
|
80
|
+
|
|
81
|
+
## CPU contention
|
|
82
|
+
|
|
83
|
+
If the problem occurs only under load, compare the same bounded interaction
|
|
84
|
+
with and without controlled, self-terminating load. Record CPU, available memory,
|
|
85
|
+
and GPU conditions. Do not saturate a shared machine without its owner's consent.
|
|
86
|
+
|
|
87
|
+
- Work cost rises: investigate paint, layout, draw calls, and cache activity.
|
|
88
|
+
- Work stays flat but frame count falls: investigate delivery and scheduling.
|
|
89
|
+
- Video calls can also create GPU contention; CPU load alone does not model it.
|
|
90
|
+
|
|
91
|
+
Keep load duration and concurrency explicit and stop only processes you started.
|
|
92
|
+
Repeat a noisy comparison enough to establish the effect; preserve failed runs
|
|
93
|
+
and report variability instead of selecting the fastest capture.
|