-
Notifications
You must be signed in to change notification settings - Fork 184
Simple fixes to reduce memory consumption. #935
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
Merged
Merged
Conversation
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
xeioex
requested changes
Jun 28, 2025
xeioex
requested changes
Jun 30, 2025
e3a9313
to
d40a7f9
Compare
b13eab3
to
ffcbd26
Compare
Previously, fhq->value was set to a previous value if the value existed. This is not used anymore in the code.
Removed enum_in_object_hash which is only set when prop->type is NJS_WHITEOUT and this check can be used instead.
ffcbd26
to
112e03f
Compare
Merged
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.
As primary test was used following test-fill-array script, and bench4 script:
As additional test was used bench4 testsuite.
############### test-fill-array 1000000
qjs
init size=1000000
RSS:91452kb
njs (this patch)
init size=1000000
RSS:239024kb
njs (before this patch)
init size=1000000
RSS:607508kb
njs v0.8.9 (before "atomic patch")
init size=1000000
RSS:499816kb
############### bench4
qjs
Richards: 898
Crypto: 1060
RayTrace: 1003
NavierStokes: 1913
----
Score (version 9): 1162
RSS:6420kb
njs (this patch)
Richards: 634
Crypto: 1014
RayTrace: 501
NavierStokes: 1553
----
Score (version 9): 841
RSS:2697088kb
njs (before this patch)
Richards: 564
Crypto: 952
RayTrace: 494
NavierStokes: 1440
----
Score (version 9): 786
RSS:2830720kb
njs v0.8.9 (before "atomic patch")
Richards: 361
Crypto: 853
RayTrace: 363
NavierStokes: 1309
----
Score (version 9): 618
RSS:3026688kb
Fixes for memory consumption in flathsh will be added soon.