b3a7d9f030
As discussed this enables the context caching for the middleware/edge functions sandbox in development which reduces execution time noticeably as modules don't need to be re-processed for each request unless an HMR event related to that context has occurred. In a follow-up PR we can investigate spreading the middleware/edge function invocations across workers/processes now that we have detached rendering/invoke processes from the routing process. <details> <summary>before</summary> ![CleanShot 2023-04-02 at 22 23 45@2x](https://user-images.githubusercontent.com/22380829/229419430-5eed36e9-2615-44be-9314-490cb7283e5b.png) </details> <details> <summary>after</summary> ![CleanShot 2023-04-02 at 22 24 41@2x](https://user-images.githubusercontent.com/22380829/229419472-822a2d16-7e0d-4ee8-99c2-b1211010ebcf.png) </details> x-ref: [slack thread](https://vercel.slack.com/archives/C03KAR5DCKC/p1677431214936269) Fixes: https://github.com/vercel/next.js/issues/43999 |
||
---|---|---|
.. | ||
pages | ||
test | ||
middleware.js |