|
|
|
|
|
by martinald
1312 days ago
|
|
The problem isn't the amount of data but the number of round trips required to get it. Imagine you need to do the following calls to get the page rendered with the various information different parts of the page has: 1. Get user information 2. Get projects for user 3. Get the selected project Now, if this was all server side rendered, it might take 1ms to go to the database and get the various bits of info, or 3ms for 3 sequential requests. With a react app and say 250ms of latency to the database, you're looking at 750ms of overhead - 200x slower. Of course you can architect all your APIs to always return everything the user needs so they don't have to do multiple requests, but that has its own drawbacks and honestly is very difficult to do and plan ahead for, especially at scale with multiple consumers of various APIs. |
|