5 ms·
Reading that entire thing was a struggle. Really feels like _everyone_ is wrong here. Yes the current state of FE development is overly dogmatic and cultish.
by coolhand2120 3y ago
Reading that entire thing was a struggle. Really feels like _everyone_ is wrong here. Yes the current state of FE development is overly dogmatic and cultish. But it always has been. On the other hand the frameworks and build systems are solving actual problems, they're not there for looks.
5-7 second skeleton loaders are there because backend systems are slow, not because of the front end application. You can say "oh but you can pre-render", but there are times when you can't. You could render the whole thing on the backend, but then you'll wait 5-7 seconds at a white page vs. progressive loading. Whatever is taking 5-7 seconds (LCP) is not going to get faster for you in your region by some magical front end dance.
Not every business is the same and no one solution will work for everyone. And concluding that we should "go back to jQuery" really speaks volumes of the author. jQuery was not "the good old days".
The problem with FE is that they seem to be wannabe nodejs BE devs instead of the W3C experts they should be. If FE devs focus on web standards and less on Rube Goldberg machines they would be well served.
- shakabrah 3y agohere here. I am very thankful that when i started out a decade ago the first book i read was Designing with Web Standards. I still recommend it to noobs but i can’t necessarily blame them for not getting through it when there are more shiny things like React and Vite to learn about. To read that book now would be largely a history lesson because we no longer have to fight to maintain some quirk between a handful of browser versions. But man, knowing about semantic markup and really getting why that is a thing in the first place is super important.
- felixgallo 3y agothere is no way any competently written back end system takes 5-7 seconds for any reason whatsoever. A middling back end system with median complexity is doing 10-100K requests per second per server and is near-perfectly horizontally scalable.
- herrkanin 3y agoNot everyone has the luxury to work with competently written backend systems.
- lacrimacida 3y agoNot everyone has the luxury to work with competently written front end systems.
- weego 3y agoThe entire Internet apparently did for years because frontend JS monoliths only appeared halfway though my career.
- ljm 3y agoThere was a time where a request taking even 500ms was considered to be slow, and then all of a sudden it just became normal to see API traces where requests would take over a second, or multiple seconds, and people would just shrug at it. Even a backend roughly cobbled together in PHP4 with Varnish running on top of it would considerably outperform some of the stuff that is accepted as 'good enough' today.
- szszrk 3y ago> with Varnish running on top Like it's a trivial task. If it is... the whole system wasn't that complicated and likely similar results could be achieved without external caching.
- ch4s3 3y ago> there is no way any competently written back end system takes 5-7 seconds for any reason whatsoever. I'd argue that even a well written system that allows arbitrary date ranges and filtering of data can easily run past that limit. You just can always know ahead of time what some client might request and some strategies for making normal queries fast can make some queries slower. Its tradeoffs all the way down.
- felixgallo 3y agodefinitely not. If you don't already know ahead of time what a client might request, and just let them request anything arbitrarily without regard for whether that data is indexed or cached, then you are not competently writing a backend system.
- pcthrowaway 3y agoI didn't realize that a search engine needs to be able to predict 100% of the phrases a user might search for in order to be competent
- WkndTriathlete 3y agoAnd yet somehow Google, Bing, etc. manage to return results in much less than 3 seconds.
- tmcdos 3y agoBut then we have just one Google and one Bing rather than thousands of them.
- coolhand2120 3y agoIf you serve data from a DC in California to the west coast of Australia it will take 10 seconds of just network transfer time. Sometimes data has a high degree of cardinality and cannot be cached. Some companies cannot afford to, or for other reasons cannot, have regional instances of their compute surfaces. This is just one common scenario, there are many others. > A middling back end system with median complexity is doing 10-100K requests per second per server and is near-perfectly horizontally scalable. You know perfectly your SLAs without knowing anything about the business, data, or the user access pattern? You don't even need a budget? Impressive!
- hipadev23 3y ago> If you serve data from a DC in California to the west coast of Australia it will take 10 seconds of just network transfer time. What? Is this a typo or do you think that’s true?
- willsmith72 3y ago> If you serve data from a DC in California to the west coast of Australia it will take 10 seconds of just network transfer time Where did you get that calculation? Looks way way off
- felixgallo 3y agoYou have no idea what you're talking about. Perth is about a third of a second away from Los Angeles. There is no data that cannot be cached owing to 'high cardinality'. There does not exist a company that is trying to serve Perth traffic from a US CA DC that cannot afford a server that can do 100k RPS.
- firecall 3y agoAs a fellow Australian here in South Australia, I can say with certainty that I've never had it that bad! I can measure the difference between US, Singapore and Sydney based DCs, but it's milliseconds. 10 seconds is abnormal and would indicate to me that something isn't functioning as expected!
- Spivak 3y agoYeah, for anyone reading this that doesn't know these are embarrassing numbers. We call it an outage if our p95 latency goes above 100ms for more than a minute. Even if you think this is aggressive 50x slower is not normal. There will be necessarily be tasks that take longer than that but don't make your user sit there with the page just spinning. Post back when the task is finished asynchronously. Especially on mobile where those kinds of delays are assumed to be issues with the network and users will just hit the x and refresh.
- spinningarrow 3y agoI cannot fathom how you arrived at that conclusion - there are so many systems that need to display the results of complex data queries where caching or precomputing the results does not make sense - waiting several seconds for results would be normal in those cases.
- felixgallo 3y agoI've been building backend systems for over 35 years across many industries.
- financltravsty 3y agoI will echo what the parent said: there’s no way your backend is taking seconds (fucking seconds) to return data unless there is something terribly wrong with your system. Complex queries should be optimized. The only time I have run into query issues is when: I was lazy, and didn’t want to optimize the query/schema/data layout and structures; the system was built by someone of questionable sanity and skillset; or the generated data is legitimately compute intensive, requiring lots of math i.e. more ops and cycles, but at that point it’s a report and the user can wait for it to gen (but in this case it is a lot of math that hasn’t taken advantage of parrallization). In the wild, I’ve mostly seen people having zero clue what they’re doing (this includes management, who are as culpable for not caring about perf).
- spinningarrow 3y agoChatGPT and many AI tools take several seconds to return responses. I’m not saying it should always or even most of the time be the case (quite the opposite - I’m with you and parent on that) but to say that there is no situation like that strikes me as pretty odd.
- financltravsty 3y agoThis was not always the case; and local models respond almost instantly. In ChatGPT's case, I'm assuming they're throttling responses to not hemorrhage money.
- willsmith72 3y agoIt's not 1 request. It's a request waterfall in almost all cases. See the remix homepage for a great demo and pitch on why remix is awesome https://remix.run/ https://remix.run/
- sesm 3y ago10-100k RPS is throughput, not latency. There is a well-known latency-throughput tradeoff. For example, Erlang’s BEAM VM is optimized for low latency, while JVM is optimized for high throughput.
- firecall 3y agoI'm with you on this! Sure, I can allow users to run reports that take multiple seconds, but I'm generally not delivering that to the browser to be rendered. And if I was, I'd crash the browser tab. Which is surprisingly easy to do...
- gedy 3y agoI've seen this with pretty normal Rails apps that some folks like to praise for the "productivity"
- bsder 3y ago> there is no way any competently written back end system takes 5-7 seconds for any reason whatsoever. Sure there is--ad networks. Remember when 100ms was considered fatal? Funny how that went right out the window when the big companies decided that shoveling more ads at users was more profitable than anything else. The current state of web development is all to paper over the idiocies brought along by serving ads. Those of us who do web development and don't have to serve ads can pretty much use anything and hit metrics under 100ms and can scale for a very, very long time.
- atraac 3y ago1. Most software is NOT competently written - just look how bad your average, day to day software runs. 2. Salesforce, JIRA, Microsoft Teams, Reddit, even Gmail recently takes up to a minute to get content and be responsive, just to name a few.
- truculent 3y ago> The problem with FE is that they seem to be wannabe nodejs BE devs instead of the W3C experts they should be What are the best resources for someone interested in being a W3C expert? (Aside from just slogging through https://www.w3.org/TR/ https://www.w3.org/TR/)
- codeptualize 3y agoMDN is one of the best resources imo https://developer.mozilla.org/ https://developer.mozilla.org/ Generally more practical than W3C.
- truculent 3y agoThank you!
- ljm 3y agoI think most of the post fell wide of the mark and as much as I hate to be cynical, I feel like the completely tangential Erlang piece is just there to game HN because HN lately can't get enough of Erlang and Elixir. I don't think there was much to take away from this article except that the author should perhaps spend less time paying attention to the opinion of randos on Twitter.
- troupo 3y ago> 5-7 second skeleton loaders are there because backend systems are slow, not because of the front end application. There are very, cery, very few cases of this. The vast majority of "applications" we have are due to people not caring. E.g. a recent Reddit redesign was praised because their time to paint was 2.4 seconds. Their backend rarely responds in more than 0.4 seconds. > If FE devs focus on web standards and less on Rube Goldberg machines they would be well served. Why do you think we have these Rube Goldberg machines? Precisely because standards are utter garbage. And doing anything with them leads to more Rube Goldberg machines.