Description
Is your feature request related to a problem?
I have created a very basic hello-world Next.js application: https://github.com/dario-piotrowicz/next-14-hello-world-app
And deployed it on Cloudflare using:
- the open-next adapter opennextjs-cloudflare
- next-on-pages
- next-on-pages solution, but deployed using workers' static assets
By running some benchmarking I saw the request handling on open-next is longer than the next-on-pages one (the measures are in milliseconds):
Ideally we should close the gap and even make open-next faster then next-on-pages
Describe the solution you'd like
The only thing that comes to mind is trying to add lazy loading to the built application and hoping that it can help with performance.
Describe alternatives you've considered
We could probably also analyze the code and eliminate code that doesn't need to be there if any.
@opennextjs/cloudflare version
0.3.3
Additional context
One thing that makes open-next slower is the fact that it can incur assets worker cold starts, something that should ideally get better as usage of workers assets increases over time.
Before submitting
- I have checked that there isn't already a similar feature request
- This is a single feature (not multiple features in one request)