Repository navigation
perf: Hot reload's source snapshot capture after a compile rewrites only the changed sources, and is skipped when hot reload and pause point are both disabled - #3278
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk | ⚪ Minimal · up to
|
…s branch's tree The squash commit has the same tree as 974a2b5, which this branch already contains, so the merge records it without changing any file.
Summary
CompilationPipeline.GetAssemblies()(450–850 ms). Unity answers it only on the main thread, and the capture is its first caller after a domain reload, so the capture also fills the per-domain list that later hot reload steps reuse. After a file add or remove, most of the remaining time is per-source work over about 10,000 sources: two stats per source, reading the previous manifests, and string handling. Taking both off the main thread is the next phase and is not part of this pull request.Merge status
perf/hot-reload-snapshot-capture. The reporting agent measured the trial project twice: on headc8137355(the breakdown only, as the baseline) and on head974a2b56(this pull request's head). Each measurement had five body edits and three file adds or removes, withULOOP_DEBUGset and the Editor in the background.974a2b56, every body edit copied 1 file and kept 1,292, every file add or remove copied 0 or 1 file and kept 10,054, and read/write time was 0–1 ms. One hot reload after a body edit reportedAppliedwith one method patched, and the default file selection picked only the edited file. No reason about a missing snapshot or a PDB checksum mismatch appeared. No Console error or exception appeared during either measurement window.User Impact
totalMs)captureMshot_reload_source_snapshot_breakdowndebug entry per capture gives each phase's time and counts, includingfilesReused(ULOOP_DEBUGbuilds only)CompilationPipeline.GetAssemblies()on every compiled assembly of the development project. Not called from production yetVerification
974a2b56: Unity EditMode Tests (2022.3.62f3, 6000.3.15f1, 6000.5.8f1, latest 6000.7, and the Release code optimization leg) and Unity Compile Check (2022.3.62f1, 6000.5.4f1) passed. In the root GameCI container, the two perf: Hot reload's source snapshot capture rewrites only the sources that changed since the last compile #3277 tests that need a user who can be denied file access are reported as Skipped, by design.totalMs(ms):c8137355974a2b56Refs #3222