perf: optimize native Skia raster replay#1577
Merged
edwardkim merged 5 commits intoJun 27, 2026
Merged
Conversation
e40a026 to
b91478b
Compare
edwardkim
added a commit
that referenced
this pull request
Jun 27, 2026
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Owner
|
merge 완료했습니다 (merge commit 587c8fc, origin/devel 포함 검증). 감사합니다, @humdrum00001010! #1569(FontMgr 캐시)에 이은 두 번째 Skia 최적화군요. 이번엔 PNG byte가 압축 비용 감소로 달라지므로(byte-identical 아님), 메인테이너가 픽셀 단위 동등을 직접 검증했습니다: before(devel)/after(PR) 바이너리를 각각 native-skia 빌드해 4개 샘플(보고서 양식 891,662px / HWPX 표·이미지 / 수식 / 표) page 0를 export-png 후 PNG를 디코드해 RGBA 비교한 결과, 모두 최대 픽셀차 0 / 다른 픽셀 0 (디코드 픽셀 100% 동일). byte만 다르고 렌더 내용은 불변임을 확인했습니다 (CI Canvas visual diff / Render Diff pass와 일치). PaintOp Box화는 paint::json(14)/paint 모듈(64) 테스트로 직렬화 출력 무영향 확인, native-skia lib 2009 passed, 전체 회귀 FAILED 0건입니다. warm per-page render ~2배 개선이 Live Editing 체감에 좋겠네요. 좋은 최적화 감사합니다! |
planet6897
added a commit
to planet6897/rhwp
that referenced
this pull request
Jun 27, 2026
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
PaintOppayloads for a smaller, more cache-friendly replay path.SkiaLayerRenderer::new()FontMgr/system-family cache; that is covered by perf: cache FontMgr + system font enumeration thread-locally in SkiaLayerRenderer::new #1569.Measurements
이 벤치마크는 Live Editing 경로를 겨냥합니다. 문서가 열린 뒤에는 편집할 때마다 이미 로드된 해당 페이지가 반복적으로 무효화되고 다시 렌더링됩니다. 그래서 사용자가 편집 중 실제로 체감하는 지연은 일회성 cold startup이나 CLI 프로세스 시간이 아니라 warm per-page rendering 시간입니다.
samples/143E433F503322BD33.hwppage 0upstream/devel161a09d9: median 58.528 ms, p95 62.115 ms, 309,134 bytes → PR11b2c684: median 28.970 ms, p95 33.154 ms, 309,721 bytesMethod for warm render benchmark:
DocumentCore::from_bytesonce, 10 warm-up renders, then 120 measured iterations ofrender_page_png_native(0)in the same process. This excludes CLI startup and repeated document parsing.Validation
cargo test --features native-skia skia --lib— 48 passed, 0 failedcargo test --features native-skia --lib— 1987 passed, 0 failed, 6 ignoredcargo build --release --features native-skia --bin rhwpupstream/devel161a09d9,target/release/rhwp export-png samples/143E433F503322BD33.hwp --page 0 --output /tmp/rhwp-pr-opt-before— real 0.09s, 309,134 bytes PNG11b2c684,target/release/rhwp export-png samples/143E433F503322BD33.hwp --page 0 --output /tmp/rhwp-pr-opt-final-current— real 0.08s, 309,721 bytes PNG