News for hackers. Stuff that matters.
Re:Limiting JavaScript? by est31 on Saturday February 02, 2019 @09:29PM (#19067422)
Modern computers are so fast, they can process gigabytes over gigabytes of data. And often, the content we browse on the web is text based, or text with some images. Still, web sites manage to suck up the remaining capacity. Why? Web browsers are faster than ever before, but web sites are bloatier than ever before, eating up all the hardware and software capabilities.

I don't think that writing lots of lean web sites and hoping for people to switch for them is the right approach. The approach chosen here, by using the power of the user agent, seems the right one.

Re:Limiting JavaScript? by kllrnohj on Sunday February 03, 2019 @12:21AM (#19068022)
> Web browsers are faster than ever before, but web sites are bloatier than ever before, eating up all the hardware and software capabilities.

Are they? Have web browsers actually gotten any faster at all over the last, say, 5 years? 10?

JS engines got a bit faster, but what about CSS & HTML parsing? 2D rendering performance? Layout engine performance? DOM performance? Mozilla made a bit of noise about this a year or two ago with their whole Project Quantum push - but had you ever heard a peep about this stuff prior to that? Or since? Nobody benchmarks this stuff, and yet it's insanely critical to interactive performance. But since it's harder to measure than JS performance, the only thing ever measured is JS performance. And occasionally, rarely, page load speeds.

Open up a 10MB plain text file in Chrome and it completely falls over. Zero JS. Zero CSS. Zero HTML. Just plain text. Are modern browsers really fast?

And for what it's worth modern computers are wide - 4 core with SMT is damn near low end these days. Yet the web is still incredibly stuck in the single-thread mode of operation. Both the browser internally and the platform itself (WebWorkers are far too slow, heavy, and restricted to meaningfully be used to offload interactive work). And there's almost no work being done to address this. WASM's threads are the only sliver of light here on the platform side. Is it really surprising that people throw RAM at the problem as a result? Throwing more caches at things is the natural response to being heavily starved for CPU on the single thread you can use.

Re:Limiting JavaScript? by webmobdev on Sunday February 03, 2019 @04:20AM (#19068587)
Agree 100% with you. All we have to do is look at the Opera browser with their Presto rendering engine to realise the truth of this - it really rattled Internet Explorer and Microsoft with its super fast rendering speed and small size that made it easy to download on slow connections. It made Internet Explorer and Firefox look like clunky and slow bloats of software. Opera was so good that they were able to charge for it, and despite the free browsers available many people bought it.
Re:Limiting JavaScript? by zeroname on Sunday February 03, 2019 @04:27AM (#19068612)
I'm not sure that's a fair comparison though, Presto didn't support HTML as thoroughly and it has since dropped out of the race entirely.

We can't be piling more and more high-level crap onto the standard and expect Moore's law to keep up with it.

Re:Limiting JavaScript? by webmobdev on Sunday February 03, 2019 @11:00AM (#19070287)
As far as I remember, Opera with its own rendering engine used to be one of the most web standards compliant browsers.

That said, my point stands - I was pointing out how browsers like Firefox and Chrome are still bloated softwares compared to early Opera (pre Blink, Presto versions). Them "dropping out of the race" is irrelevant to that aspect.

Re:Limiting JavaScript? by kirion25 on Sunday February 03, 2019 @02:02PM (#19071453)
It's actually the opposite, Opera (Presto) was stricter in its adherence to standards. It was the first/second (depending on OS) to pass the acid 2 tests, and constantly was among the top scorers.

That said, there were often compatibility problems on various websites, because they favored IE (which wasn't standards compliant), and rarely if ever tested on Opera.

Re:Limiting JavaScript? by paulddraper on Sunday February 03, 2019 @05:31PM (#19072663)
Exactly.

JS is absuerdly fast (comparatively).

The DOM/rendering is sluggish (comparatively).

The observation is the driving point behind virtual DOM.

Also why high performance rendering uses Canvas or WebGL, at the expense of debugging tools, browser extensions, and accessibility.

Re:Limiting JavaScript? by zeroname on Sunday February 03, 2019 @04:22AM (#19068592)
> Web browsers are faster than ever before

That's not true at all, browser used to be much faster when HTML was simpler.

> ...but web sites are bloatier than ever before, eating up all the hardware and software capabilities.

Actually, even a rather simple website can very slow to render, if it does a significant amount of dynamic updates. DOM performance is an absolute disaster, hence all these "virtual dom" implementations like React. CSS Layouting is incredibly expensive. That has nothing to do with website bloat in and of itself, it's the platform coming bloated out of the box.