Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: Refactor recursiveReadDirSync (#52517)
- Use `opendirSync` instead of `readdirSync` - Use `.slice` instead of `.replace` as the rootDir Before (1.54ms): ![CleanShot 2023-07-10 at 18 33 23@2x](https://github.com/vercel/next.js/assets/3676859/829e0a49-35da-4754-bc3f-6fe243e815f4) With the change (0.88ms): ![CleanShot 2023-07-10 at 18 47 43@2x](https://github.com/vercel/next.js/assets/3676859/cabe1fdd-5861-49ba-8c8d-b505c16fbf7a) This scales when public/ folder grows.
- Loading branch information