Skip to content

[codex] optimize runtime module cache and scene startup - #866

Draft
looopmax wants to merge 2 commits into
cocos:mainfrom
looopmax:feat/scene-process-cpu-profile
Draft

[codex] optimize runtime module cache and scene startup#866
looopmax wants to merge 2 commits into
cocos:mainfrom
looopmax:feat/scene-process-cpu-profile

Conversation

@looopmax

Copy link
Copy Markdown
Contributor

Summary

  • add a version-isolated runtime module cache for CommonJS and JSON modules
  • reuse compiled module wrappers and V8 cached data across Cocos Host and Scene process starts
  • remove the setTimeout delay from lazy asset refresh batching and process queued refreshes with one Promise.all
  • add startup CPU profiling support for the Scene process and related tests

Validation

  • npm test -- --runInBand tests/runtime-bundle.test.ts src/core/scene/scene-process/startup-cpu-profiler.test.ts
  • npm run test:asset-db

The cache keeps the synchronous module-loading contract, refreshes file freshness asynchronously, and isolates cache files by tool versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant