Repository navigation
Conversation
Extract the expression-only performance pipeline from storytold#856, preserve native impurity tracking, and retain graph-sized memo working sets with full estimated storage accounting. Validated native all-target strict Clippy, focused WASM check, formatting and diff checks. Behavioral regression tests compiled but not executed under daytime policy. Earlier local evaluator performance/checksum measurements are documented with provenance.
This branch has not been deployed
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.
Expressions that repeatedly read other properties rerun scripts and rebuild host data unnecessarily. This PR extracts the expression-performance work from #856 into an independent change against current main, then extends its bounded result memo to retain graph-sized working sets. This PR has no media/audio, GPU residency, UI, dependency or manifest changes.
What changes
Math.randomandDate, including computed access, aliases and prototype access; existing cycle/time limits remain.sourceRectAtTimebounds without rasterizing, using the same buffer-extent calculation as rendering.Measurements and limits
The cache-capacity follow-up was measured on a local development integration, not rerun on this upstream adaptation. For repeated sweeps of 20 expression properties (28,800 evaluations), the standalone probe improved from 300.97 → 21.02 ms p50 and 321.80 → 26.66 ms p95. Numeric checksums matched at 1/4/8/20/50 properties. Peak diagnostic-process RSS rose from 27.36 → 57.58 MiB. The 50-property working set still exceeds the cache and still executes every script.
These are CPU evaluator measurements, not input-to-visible-frame latency or a whole-PR speedup claim. The budget estimates retained memo storage, not allocator RSS or total app RAM, and is per thread. Methodology and the full table: docs/expression-cache-performance.md.
Validation
cargo clippy -p effectcraft-expr -p effectcraft-render --all-targets -- -D warnings.cargo check -p effectcraft-expr -p effectcraft-render --target wasm32-unknown-unknown.rustfmt --checkon all changed Rust files andgit diff --check.This is the expression-only alternative to the broader held #856, including its expression prerequisites so it can be reviewed and merged independently.
Review follow-up
Integrated current upstream main and fixed clock access through property descriptors, including
Object.getOwnPropertyDescriptor(Date, "now").value(). The captured native clock function is wrapped before exposure so aliases and descriptors cannot bypass impurity tracking. Added a deterministic script-run-count regression.Final-tree formatting and strict workspace/all-target release Clippy passed. Exact old/fixed clock-wrapper probes reproduced the bypass and verified the fix in Node and Boa. Full behavioral tests and fresh performance benchmarks were not run for this update.