Skip to content

Commit

Permalink
Modules: removed extra VMs creation when it is not needed.
Browse files Browse the repository at this point in the history
Previously, a new VM instance was created for every location. This is
not needed and consumes a lot of memory for large configurations.
Instead, if no new js_import is introduced on the location level server
level VM should be used.

The issue was introduced in 9b67441 (0.8.6).

This fixes #795 issue on Github.
  • Loading branch information
xeioex committed Oct 12, 2024
1 parent 6902aaa commit 0806eb1
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion nginx/ngx_js.c
Original file line number Diff line number Diff line change
Expand Up @@ -3360,7 +3360,6 @@ ngx_js_merge_vm(ngx_conf_t *cf, ngx_js_loc_conf_t *conf,
ngx_js_named_path_t *import, *pi, *pij, *preload;

if (conf->imports == NGX_CONF_UNSET_PTR
&& conf->type == NGX_CONF_UNSET_UINT
&& conf->paths == NGX_CONF_UNSET_PTR
&& conf->preload_objects == NGX_CONF_UNSET_PTR)
{
Expand Down

0 comments on commit 0806eb1

Please sign in to comment.