Replies: 2 comments 10 replies
-
You are running it in dev mode. For best performance you should build it and run it in production mode. Instead of pnpm dev run pnpm build
pnpm start Another thing to think about regarding performance is the roundtrip to the database. Where is the code running vs where is the database running. If they are far apart on slow internet, it will go slow. If they are near with fast connection it will be faster. |
Beta Was this translation helpful? Give feedback.
-
@jmikrut is there any sensible explanation why a simple Global retrieval in Payload 3 (local production build with a local MongoDB) works three times slower (~1000 ms) than in Payload 2 deployed in the Cloud with a remote MongoDB (~180-200 ms). With all/most other things being equal, it appears to me that Next.js is just so much slower than the old way Payload was run. |
Beta Was this translation helpful? Give feedback.
-
I followed the migration guide from Payload v2 to v3 for a setup on MongoDB and Cloud Storage (GCP). Most of the migration went really without significant hiccups. However, the performance of the new Next-based Payload is pathetically slow. For example, It takes about seconds 2-3 seconds to switch between Edit mode to Versions, to API.
Look at these times, on a fairly small project.
It is about 50-100 times slower than v2.
Just look at the start-up time and the initial load of the
/admin
route:User info in 6 seconds?
I conducted the test with the CLI-produced
website
example on MongoDB, and it is just as slow. Was this whole idea to move to Next.js not worth it?Beta Was this translation helpful? Give feedback.
All reactions