]> git.kaiwu.me - njs.git/commit
Modules: removed extra VM creation per server.
authorDmitry Volyntsev <xeioex@nginx.com>
Sat, 4 Jan 2025 06:25:15 +0000 (22:25 -0800)
committerDmitry Volyntsev <xeioexception@gmail.com>
Mon, 6 Jan 2025 23:52:14 +0000 (15:52 -0800)
commit855aa4c9fac01bd9fbdb1602b523edc00117ff09
tree15d959648fd516e8257b9d97bfd815cf6a1c5c13
parent4fb1c0ca6c950dc0460eaeec1ba3e96a53070878
Modules: removed extra VM creation per server.

Previously, when js_import was declared in http or stream blocks, an extra
copy of the VM instance was created for each server block. This was not
needed and consumed a lot of memory for configurations with many server
blocks.

This issue was introduced in 9b674412 (0.8.6) and was
partially fixed for location blocks only in 685b64f0 (0.8.7).
nginx/ngx_js.c
nginx/t/js_import2.t
nginx/t/js_merge_location_blocks.t [new file with mode: 0644]
nginx/t/js_merge_server_blocks.t [new file with mode: 0644]
nginx/t/stream_js.t