perf(native): optimize iOS transcript refresh and add frame profiling

Preserve hosted rows while propagating current SwiftUI environments and render captures. Add differential refresh regressions, opt-in real-clock iOS/Android profiling, and reproducible performance results.

Validation: typecheck; CLI/hub/web/shared/relay suites (Web rerun with NODE_OPTIONS=--no-experimental-webstorage for Node 26/jsdom compatibility); existing iOS Debug/Release and Android regression runs.
This commit is contained in:
weishu
2026-09-10 16:22:36 +08:00
parent c2e3d16b7e
commit 0dcc70e7c7
13 changed files with 3242 additions and 13 deletions
+3 -2
View File
@@ -21,14 +21,15 @@ final class TranscriptGeometryTests: XCTestCase {
}
layout.prepare()
func verify(width: CGFloat) {
@MainActor func verify(width: CGFloat) {
var y: CGFloat = 10
let expected = ids.map { id -> CGRect in
let frame = CGRect(x: 12, y: y, width: width - 24, height: heights[id] ?? 100)
y = frame.maxY + 10
return frame
}
XCTAssertEqual(layout.collectionViewContentSize.height, y, accuracy: 0.01)
let actualHeight = layout.collectionViewContentSize.height
XCTAssertEqual(actualHeight, y, accuracy: 0.01)
let rects = stride(from: -500, to: Int(y) + 500, by: 377).map {
CGRect(x: 0, y: $0, width: Int(width), height: 844)
} + [.zero, .null, .infinite, CGRect(x: 1000, y: 0, width: 100, height: 100000)]