Repository: next.js
Issue: i18n in next.config.js introduces significant latency in App Router
Labels: bug,Internationalization (i18n)

### Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/z3jmlt

### To Reproduce

1. Navigate to provided link
2. Fork it
3. Start server by running `pnpm dev`


### Current vs. Expected behavior

The combination of App Router with Pages Router seems to introduce large latency.
We migrated some of our page routes to app routes as being suggested by an official Next.JS guide(gradual migration) but this process wasn't smooth and we still couldn't go life due to the latency issues on App Router.
We have done profiling of pages routes vs app routes with the help of load tests and could identify that P95 and P90 latency are 10X higher on App Router compare to Pages Router.
See below screenshot.

![image](https://github.com/user-attachments/assets/65f51270-e81d-4171-88e7-b4bd2441b7df)


I also created a sandbox environment to try and confirm if this behaviour can also be observed there and below on dev server I can see near similar results related to latency.
I got `/test-app-router` in the app folder and `/test-pages-router` in pages folder.
Results are below: 

```
 ✓ Starting...
 ✓ Ready in 2.4s
Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
 ○ Compiling / ...
 ✓ Compiled / in 4.5s (544 modules)
 GET / 200 in 4728ms
 GET / 200 in 35ms
 ○ Compiling /test-app-router ...
 ✓ Compiled /test-app-router in 512ms (516 modules)
 GET /test-app-router 200 in 767ms
 ⚠ Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/messages/fast-refresh-reload
 ○ Compiling /test-pages-router ...
 ✓ Compiled /test-pages-router in 1761ms (744 modules)
 GET /test-pages-router 200 in 1879ms
 ⚠ Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/messages/fast-refresh-reload
 GET /test-pages-router 200 in 14ms
 GET /test-pages-router 200 in 10ms
 GET /test-app-router 200 in 95ms
 GET /test-app-router 200 in 25ms
 GET /test-pages-router 200 in 8ms
 GET /test-app-router 200 in 24ms
 GET /test-pages-router 200 in 7ms
 GET /test-app-router 200 in 19ms
 GET /test-pages-router 200 in 6ms
 GET /test-app-router 200 in 16ms
 ⚠ Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/messages/fast-refresh-reload
 GET /test-pages-router 200 in 54ms
 GET /test-app-router 200 in 28ms
 GET /test-pages-router 200 in 7ms
 GET /test-app-router 200 in 25ms
 GET /test-pages-router 200 in 7ms
 GET /test-app-router 200 in 18ms
 GET /test-pages-router 200 in 6ms
```

After caching is stabilised in browser we can clearly see that app router is 3x times slower than pages router.
This behaviour is making gradually migration from pages router to app router impossible. 


### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.6.0
  Available memory (MB): 16384
  Available CPU cores: 10
Binaries:
  Node: 20.11.0
  npm: 10.2.4
  Yarn: N/A
  pnpm: 9.6.0
Relevant Packages:
  next: 14.2.4 // There is a newer version (14.2.7) available, upgrade recommended!
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.2.2
```


### Which area(s) are affected? (Select all that apply)

Not sure

### Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local), Other (Deployed)

### Additional context

Our production app is running on Linux system.
Same behaviour can be observed both on Linux(prod), Darwin(local) and sandbox environment provided in the link.