logoalt Hacker News

bob1029today at 8:22 AM1 replyview on HN

The UI threading model is usually not the problem.

The problem usually comes from inappropriately arranging the systems of record such that information needs to be communicated beyond the scope of one computer in order to satisfy a single logical request.

Moving information between physical processors tends to be significantly more expensive than local computation over that same information. JSON serialization is a really good example of this. You need a network with bandwidth in excess of 10 GbE to begin overtaking simdjson.

SSR or SPA doesn't really matter if the server still takes a minimum of 300ms to compose any kind of response due to how its database or other infrastructure is set up. Information theory doesn't care how clever your loading indicator is. If the information isn't available, we can't do anything meaningful. Stringing the user along with psychological tricks is a lot cheaper than hiring a skilled developer to do it the right way.


Replies

inigyoutoday at 12:59 PM

Networks are much faster than you think, it's networked software that tends to be slow. 10 GbE is now table stakes, you should fire any vendor who can't offer it. I certainly don't require your internet connection to be 10Gbps, or all your desktop machines, but your internal server network should be if you're building a new one in 2026, because there's no excuse not to any more.

> Information theory doesn't care how clever your loading indicator is. If the information isn't available, we can't do anything meaningful.

Yes we can - we can fix why the information isn't available. If someone said to you "sorry, we don't have the info because the other thread is doing Sleep(5000);" you'd call them an idiot right? You'd go and delete the sleep call to make it faster. Most real problems are harder than that, but there's no fundamental rule saying your database has to be slow. Ping time across your LAN is probably under a millisecond, so where are the other 299 milliseconds going? Is your database doing a full table scan? Is it using spinning rust for frequently accessed data?

show 1 reply