Skip to content

Conversation

@VadimZhestikov
Copy link
Contributor

@VadimZhestikov VadimZhestikov commented Jun 27, 2025

As primary test was used following test-fill-array script, and bench4 script:

function init(size) {
    var o = {};
    for (var i=0; i<size; i++) {
        o[`some_property${i}`] = i;
    }
}

function handler() {
    var size = ("undefined" == typeof scriptArgs) ? Number(process.argv[2]):
       Number(scriptArgs[1]);

    console.log('init size='+size);

    init(size);
}

handler();

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.

@VadimZhestikov VadimZhestikov changed the title Simple fixes to reduce memory consumption, Simple fixes to reduce memory consumption. Jun 27, 2025
@VadimZhestikov VadimZhestikov requested a review from xeioex June 27, 2025 18:19
xeioex

This comment was marked as resolved.

@VadimZhestikov VadimZhestikov force-pushed the mem-obj-trans-min branch 6 times, most recently from e3a9313 to d40a7f9 Compare July 1, 2025 21:48
@VadimZhestikov VadimZhestikov requested a review from xeioex July 1, 2025 22:11
xeioex

This comment was marked as resolved.

@VadimZhestikov VadimZhestikov force-pushed the mem-obj-trans-min branch 3 times, most recently from b13eab3 to ffcbd26 Compare July 3, 2025 02:27
xeioex

This comment was marked as resolved.

@VadimZhestikov VadimZhestikov mentioned this pull request Jul 3, 2025
xeioex

This comment was marked as resolved.

@VadimZhestikov VadimZhestikov merged commit d63a9d4 into nginx:master Jul 3, 2025
1 check 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.

2 participants