Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move module loading out of js::core::Context, so it can be customised #6199

Merged
merged 15 commits into from
Jun 4, 2024

Conversation

eddyashton
Copy link
Member

Goal is that other apps can use the js::core::Context, but read JS code from their own tables. Written to be extensible so they could also load some from hardcoded values, or modify/combine values in the KV, or...

@eddyashton eddyashton requested a review from a team as a code owner May 21, 2024 14:04
@achamayou
Copy link
Member

@eddyashton lgtm but deserves a nightly run I think.

@eddyashton
Copy link
Member Author

Note for posterity: A previous version of this PR introduced a major memory leak*, that we almost missed as we currently have no visibility into perf regressions. @achamayou stated this explicitly - we're currently making large changes to the JS interpreter but flying blind with regard to the performance impact. We only caught this one pre-merge by chance, because of a single (Daily build-gated) stress test which ballooned the memory so far it crashed a node. Restoring perf visibility is a high priority.

* I moved the cache of previously-loaded modules out of the Context, and into one of its Loaders. This meant we weren't getting caching benefits across invocations, since we installed new Loaders each time, so a long-lived interpreter (re-fetched from the interpreter cache) was continually re-processing the same modules, and linearly growing its memory use.

Copy link

github-actions bot commented May 31, 2024

🐰Bencher

ReportMon, June 3, 2024 at 09:19:58 UTC
ProjectCCF
Branch6199/merge
Testbedgha-virtual-ccf-sub

⚠️ WARNING: The following Measure does not have a Threshold. Without a Threshold, no Alerts will ever be generated!

  • Latency (latency)

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds CLI flag.

Click to view all benchmark results
BenchmarkLatencyLatency Results
nanoseconds (ns)
commit_latency_ratio➖ (view plot)0.74
historical_queries➖ (view plot)61,028.59
pi_basic_js_virtual➖ (view plot)4,360.70
pi_basic_virtual➖ (view plot)57,701.50

Bencher - Continuous Benchmarking
View Public Perf Page
Docs | Repo | Chat | Help

@eddyashton eddyashton merged commit 78796c8 into microsoft:main Jun 4, 2024
31 checks passed
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.

None yet

2 participants