Our Nuxt application has a fairly large runtime configuration and we've noticed that performance of the application decreases as the size of this config grows. The call to applyEnv takes up a large portion of the execution time. This problem is exacerbated by the fact that the runtime config is calculated for every request.
We've prototyped a simple plugin to compute the runtime config at startup and re-use for each request.
So far the results seem to be promising, and I think it might also be beneficial for those with smaller runtime configs. Do you think it makes sense to include something like this in the nitro core or is there a need for each request to have a fresh runtime config?
Additional information
[X] Would you be willing to help implement this feature?
Describe the feature
Our Nuxt application has a fairly large runtime configuration and we've noticed that performance of the application decreases as the size of this config grows. The call to
applyEnv
takes up a large portion of the execution time. This problem is exacerbated by the fact that the runtime config is calculated for every request.We've prototyped a simple plugin to compute the runtime config at startup and re-use for each request.
So far the results seem to be promising, and I think it might also be beneficial for those with smaller runtime configs. Do you think it makes sense to include something like this in the nitro core or is there a need for each request to have a fresh runtime config?
Additional information