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

Release delegate held by cached supplier #1056

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

justin-tay
Copy link
Contributor

Change to allow the delegate to be garbage collected.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.74%. Comparing base (48ca3c2) to head (9872251).
Report is 21 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1056      +/-   ##
============================================
- Coverage     78.90%   78.74%   -0.16%     
- Complexity     1965     2033      +68     
============================================
  Files           172      191      +19     
  Lines          6352     6601     +249     
  Branches       1255     1261       +6     
============================================
+ Hits           5012     5198     +186     
- Misses          867      927      +60     
- Partials        473      476       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@stevehu stevehu merged commit 2d645e6 into networknt:master Jun 11, 2024
4 checks passed
@justin-tay justin-tay deleted the cachedsupplier branch June 12, 2024 01:57
@txshtkckr
Copy link

Although allowing the cached references to be disabled entirely is an even bigger memory win, for completeness I'll offer the results of a simple test that I ran using the JSON schema we use for the Atlassian Document Format, which is available at https://go.atlassian.com/adf-json-schema .

  • Loading the schema and validating a simple document with version 1.4.3: ~455MB retained set
  • The same using version 1.5.0: ~150MB
  • The same using version 1.5.0 with cachedRefs(false): ~3MB

While we will still need to disable the caching in our own case, releasing the delegate was definitely worth it. Thanks!

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.

4 participants