Remix.run Logo
nemothekid 4 days ago

>every SPA app I’ve ever seen is two orders of magnitude slower than ordinary HTML would have been.

I'd argue then you don't have an SPA. However I don't see how you could have a application like Figma or Discord and say "ordinary HTML is faster" (or even possible).

jiggawatts 4 days ago | parent | next [-]

For ever one real "app" like Figma there are hundreds of web pages with some forms and light interactivity. Numerically there are far more enterprise LoB apps than there are true web applications that SPAs are well suited for.

nemothekid 4 days ago | parent [-]

You claimed "every SPA" app, now its down to "most". I'm not going to argue against the fact that some people have hammers and only see nails.

Every popular technology has been over implemented - these same enterprises probably have a 100-node Spark cluster to process 1GiB of data.

jiggawatts 4 days ago | parent [-]

"Every SPA app I've ever seen". I'm yet to see a fast one. Maybe they exist! I wouldn't know.

YouTube, for me, is unfathomably slow. It takes about a minute before I can get a specific song in one of my playlists playing. Every view change is 5-20 seconds, easily.

Facebook and the like now show polyfills for 10-30 characters of text, because hundreds of thousands of servers struggle to deliver half a line of text over terabits of fibre uplinks. Meanwhile my 2400 baud modem in the 1990s filled the screen with text faster!

Jira famously was so slow that this would never fail to be mentioned here any time it was mentioned. Service Now is better, but still slow for my tastes.

Etc...

If you disagree, link to me a fast SPA app that you use on a regular basis.

PS: Just after writing this, I opened a Medium article, which used -- I assume -- SSR to show me the text of the article quickly, then replaced it with grey polyfills, and then 6 full seconds later it re-rendered... the same static text with a client-side JavaScript SPA app. 100 requests, 7 MB, for 2 KB of plain text.

econ 4 days ago | parent | prev [-]

You mean a chat cliënt? That seems a good worse case scenario.

If you limit history to the most recent message (and have an link to the archive at the top) you could simply reload the entire page on some interval that declines with message frequency (and when you submit the form)

Since the html document is pretty much empty the reload happens so fast you won't see the flashing. With transitions it would be perfectly smooth.

With modern css you can put the elements out of order. You can simply append the new line to the end of the html document that represents the channel. (And to the archive) Purging a few old lines can be done less frequently.

I haven't tried it but it should work just fine. I will have to build it.

Initial load will be 100x faster. The page reloads will be larger but also insanely robust.

nemothekid 4 days ago | parent | next [-]

>You mean a chat cliënt? That seems a good worse case scenario.

No, I mean discord. An application where you can chat, recieve phone calls and watch a live stream all at the same time.

A pure html chat client is uninteresting - there have been realtime html chat clients since I was teenager, even before the release of jquery.

econ 4 days ago | parent [-]

The things I was wondering about were: 1) can a non spa chat client be as good as a spa. 2) at what point is a spa justified. (is chat enough?)

Phone calls and live streams are things for which a tab needs to stay open. If you want to do other things simultaneously both the browser and the OS could facilitate it - but do so rather poorly.

It's not why people make spa's it seems?

albedoa 4 days ago | parent | prev [-]

> You mean a chat cliënt?

Calling Discord "a chat cliënt [sic]" is barely one step removed from "I could build that in a weekend". So go ahead. Wait, what is stopping you?

econ 4 days ago | parent [-]

No audience.