Skip to content

perf(transform): skip eval cache for __mkPreval evaluations#818

Merged
layershifter merged 2 commits intomainfrom
perf/skip-eval-cache-mkpreval
Mar 13, 2026
Merged

perf(transform): skip eval cache for __mkPreval evaluations#818
layershifter merged 2 commits intomainfrom
perf/skip-eval-cache-mkpreval

Conversation

@layershifter
Copy link
Member

@layershifter layershifter commented Mar 13, 2026

Summary

  • Add useEvalCache parameter to Module.evaluate() to allow callers to opt out of eval caching
  • vmEvaluator passes useEvalCache=false — each source file produces unique codeForEvaluation (different sourceCode + expressionCode), so the eval cache would never hit and we'd just waste time on SHA-1 hashing and map storage
  • Sub-module evaluations via require() keep the default useEvalCache=true

Test plan

  • npx nx test transform — 73 tests pass

🤖 Generated with Claude Code

@layershifter layershifter requested a review from a team as a code owner March 13, 2026 13:40
@layershifter layershifter force-pushed the perf/skip-eval-cache-mkpreval branch from 6c548a7 to 32637d3 Compare March 13, 2026 13:41
__mkPreval is the unique entry-point evaluation per source file — each
call has unique sourceCode + expressionCode, so the eval cache never
hits. Add useEvalCache parameter to Module.evaluate() and pass false
from vmEvaluator.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link

github-actions bot commented Mar 13, 2026

📊 Bundle size report

✅ No changes found

@layershifter layershifter force-pushed the perf/skip-eval-cache-mkpreval branch from 32637d3 to 6482276 Compare March 13, 2026 13:42
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@layershifter layershifter merged commit 65d7de2 into main Mar 13, 2026
4 checks passed
@layershifter layershifter deleted the perf/skip-eval-cache-mkpreval branch March 13, 2026 16:46
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.

2 participants