4 ms·
You're missing the point. You're talking about the fast part which in any well optimized application is never going to be slow enough to matter. The problems st
by imtringued 6y ago
You're missing the point. You're talking about the fast part which in any well optimized application is never going to be slow enough to matter. The problems start when you sprinkle 0.5MB libraries all over your code base and you start doing an excessive amount of HTTP calls.
What you are doing is like a machinist complaining about a carpenter not measuring everything in thousands of an inch or micrometers. The reality is that wood is soft and can shrink or grow. It's maybe not the best material but it's good enough for the job and it's cheap enough that you can actually afford it.
- skohan 6y agoThe problem with this analogy is that it makes sense to work with lower quality materials in real life, because the cost savings scale with the number if units you produce. With web content it’s the exact opposite. Every time you are a bit lazy, and add another mushy, poorly optimized dependency, the cost is paid by every one of your users. The better analogy is that the web is like an assembly line that serves content. Do you want wooden equipment with poor tolerances making up that assembly line which takes twice as long and occasionally dumps parts on the ground, or do you want a well-optimized system working at peak efficiency?
- gonzo41 6y agoYou actually want what you can afford. A shitty product in the market beats a great product on localhost.
- skohan 6y agoA lot of the problems with web development have nothing to do with time to market. There's no technical reason you could not have a toolset which is just as easy to use, but far more performant.
- lostcolony 6y agoSo if it isn't easier to use, and less performant, why are these poor toolsets being chosen?
- skohan 6y agoHistory and inertia
- lostcolony 6y agoThat would explain why they continue to be used after initial adoption. It doesn't explain why they were initially chosen if there were better options using something that already existed. History and inertia also are nearly synonymous with "easier to use" in this context.
- jonathlee 6y agoBecause its the new hotness.
- deleted 6y ago[deleted]
- forgotmypw17 6y agoYou,re pointing the blame at a source of EVEN WORSE performance issues, but it doesn,t remove the slowdown described. Plain HTML renders several order of magnitudes faster than post-load JS rendering, and yes, it is noticeable, especially if you account for variable connection speeds. Most web devs develop on localhost and test on some of the best connections you can get today, leaving network performance testing as an afterthought at best... and it shows.
- branko_d 6y ago> Plain HTML renders several order of magnitudes faster than post-load JS rendering Well, "several orders of magnitude" is a bit much, but the point stands. However, that's only during the initial load. After that, JS can just keep modifying the DOM based on the data retrieved from API, and never download HTML and construct new DOM again. If done properly (and that's a big if!), and where appropriate, this can be much faster. > Most web devs develop on localhost and test on some of the best connections you can get today, leaving network performance testing as an afterthought at best... and it shows. Very true! And on beefeir CPUs/GPUs, more RAM, faster storage etc. For the last couple of years, I've been careful to develop on "midrange" hardware, exactly so I can spot performance problems earlier.
- forgotmypw17 6y ago> However, that's only during the initial load. Primary and by far most frequent use case. > After that, JS can just keep modifying the DOM based on the data retrieved from API, and never download HTML and construct new DOM again. And then you can never return to the same page again, it's gone into the either, and the Back button doesn't work properly. Anyone who doesn't support JS to the level you want? Well, fuck those people, let them make their own wheelchair ramps. > If done properly (and that's a big if!), and where appropriate, this can be much faster. A big IF, indeed.
- branko_d 6y agoI think you have "document paradigm" in mind. For "application paradigm" my points stand. That's where JS is appropriate. I did say "where appropriate", after all. > Primary and by far most frequent use case. In document paradigm. > And then you can never return to the same page again, it's gone into the either, and the Back button doesn't work properly. Not if the client-side routing is done properly. I did say "if done properly". > Anyone who doesn't support JS to the level you want? With modern transpilers, you can produce lowest-common-denominator JS. Essentially you are treating JS as a build target / ISA. > Well, fuck those people, let them make their own wheelchair ramps. What's the alternative? They can download a native app, but that doesn't work for everyone either (both from the developer and the user perspective).