rsnext/packages/next/server/api-utils
Jimmy Lai 70d7d68337
perf: lazy evaluate more modules (#41354)
In this PR, I'm inlining the require for some of the modules that I
noticed take a bit of time to evaluate on a cold boot and are not needed
most of the time.

With this, it's an extra ~15ms win on cold boots (tested locally) and we
are now at around 68ms (started from 110+).

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-10-13 14:59:46 -07:00
..
index.ts Ensure path can be specified for clearPreviewData (#40238) 2022-09-05 13:37:08 -07:00
node.ts perf: lazy evaluate more modules (#41354) 2022-10-13 14:59:46 -07:00
web.ts refactor: rewrite etag (#38568) 2022-07-18 09:20:44 +00:00