Skip to content

add cacheDir option#23

Merged
ngocphuongnb merged 5 commits into
fastschema:masterfrom
danslo:persistent-cache
Oct 28, 2025
Merged

add cacheDir option#23
ngocphuongnb merged 5 commits into
fastschema:masterfrom
danslo:persistent-cache

Conversation

@danslo
Copy link
Copy Markdown
Contributor

@danslo danslo commented Oct 24, 2025

Very cool project, nice job!

I noticed that create a new instance of the runtime takes ~300ms.
There appears to be a build cache but as far as I understand this is per process, so the first New call will always do a compilation.

Just wondering what your thoughts are on a persistent build cache?

Before:
Image

After:
flamegraph

340ms -> 70ms

@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.75%. Comparing base (903b8b5) to head (8aa2857).
⚠️ Report is 7 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master      #23    +/-   ##
========================================
  Coverage   99.74%   99.75%            
========================================
  Files          15       15            
  Lines        3576     2816   -760     
========================================
- Hits         3567     2809   -758     
+ Misses          5        3     -2     
  Partials        4        4            
Files with missing lines Coverage Δ
options.go 100.00% <ø> (ø)
runtime.go 99.03% <100.00%> (+0.25%) ⬆️

... and 13 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ngocphuongnb
Copy link
Copy Markdown
Contributor

@danslo Thanks a lot for the contribution!
The persistent cache idea and the performance improvement look great. Could you also update the tests to cover the new CacheDir option?

@danslo
Copy link
Copy Markdown
Contributor Author

danslo commented Oct 27, 2025

@ngocphuongnb Done! I think... :)

@ngocphuongnb ngocphuongnb merged commit b747fb1 into fastschema:master Oct 28, 2025
20 checks passed
@ngocphuongnb
Copy link
Copy Markdown
Contributor

@danslo The PR has been merged, thanks a lot for the contribution!

c4milo pushed a commit to c4milo/qjs that referenced this pull request Nov 19, 2025
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