Performance Concerns with App Router Compared to Pages Router #67048
Unanswered
buyaoaoman
asked this question in
App Router
Replies: 1 comment 8 replies
-
Got some code? In an app we have, TTFB went down, but interestingly enough, when the app sits behind a CDN that buffers responses, then the TTFB shoots up... expectedly of course, but I wanted to set this up, as a what it was for us, a discovery journey. For testing sake, I made a create-next-app, with the same contents in pages and app routes:
Refreshing the page several times, gives different results of course, but they two stacks are the same ballpark. |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As Next.js strongly recommends using the App Router, I assumed it would be superior to the Pages Router. However, after a period of development using the App Router, it has become clear that this is not entirely the case. Despite the advanced technologies like RSC and streaming, the response time of the App Router is significantly slower than that of the Pages Router for an SSR framework.
You don’t need a complex example to see this discrepancy. Simply create two new projects using npx create-next-app@latest for both routers, and you’ll notice a huge difference in TTFB (Time to First Byte). The App Router takes almost twice as long as the Pages Router, which is completely unacceptable.
I made this comparison because I initially aimed to enhance user experience by refactoring and upgrading my project from the Pages Router to the App Router. This result is extremely disappointing.
I’m wondering if the current Next.js team is focusing on this issue. If this continues, I might consider switching to Remix or even Nuxt.
Beta Was this translation helpful? Give feedback.
All reactions