News for hackers. Stuff that matters.
Re:Removing HTTP/2 Server Push from Chrome by vbezhenar on Friday August 19, 2022 @02:43PM (#32524653)
How many files touches some typical desktop program to display 3 pictures and 2 paragraphs of text? How many megabytes its installation occupies? My bet is that numbers will be comparable. That's the way people write software. Standards and tools should adapt. It makes no sense to complain about it as nothing changes. Every popular JS build tool helps with good practices by building a single minified bundle. Popular JS frameworks are tiny portion of those 2 megabytes. Developers just don't care and you can't do anything about it. You can build better protocols and better tools to make those applications work faster. And developers will leverage those to make their apps even slower. Who cares about 2 MB with 5G?
Re:Removing HTTP/2 Server Push from Chrome by mtoohig on Friday August 19, 2022 @06:35PM (#32526852)
As much as I agree in general, the last part affects me and many others. I only get 2.5Mb/s and I work for the WISP.

The wife's family living away from the main city have intermittent connection and slower speeds. We have only one submarine cable and poor infrastructure further out. So heavy, bloated sites eat up people's pre-paid internet packages quickly or have trouble loading altogether. Prepaid is around $1.25 for 500MB or $10 for 5.5GB.

I think lower bundle sizes should be a goal. Or lower bandwidth websites should be available such as a 'm.' Domain. IMO

Re:Removing HTTP/2 Server Push from Chrome by shadowgovt on Friday August 19, 2022 @10:24PM (#32528416)
This was one of the goals of AMP cache: require sites to use a subset of HTML and vend the data from a server local to the request.
Re:Removing HTTP/2 Server Push from Chrome by mrjin on Friday August 19, 2022 @11:04PM (#32528636)
Do you reinstall your OS/apps daily or even hourly?

^Who cares about 2 MB with 5G? That's exactly how we get into current shitty situation. Network is fast, memory is cheap so let's do whatever we want. In 2004, I only had 512MB memory on my computer, it run pretty smoothly. But now I got 64GB of memory and I run of memory now and then. I'm wondering how soon I'm going to put 1TB of RAM into my computer, not going to be too far away I reckon.

Re:Removing HTTP/2 Server Push from Chrome by doliveira on Friday August 19, 2022 @07:00PM (#32527091)
> Who cares about 2 MB with 5G

Statements like this reminds me we live in different planets. I'd argue we should still care, just like we care about accessibility in general, but obviously it's indeed a lost cause. Anyone not on 1Gbps and 32 GB of RAM is to be relegated

Re:Removing HTTP/2 Server Push from Chrome by nousermane on Friday August 19, 2022 @02:50PM (#32524726)
> How many files touches some typical desktop program to display 3 pictures

Not sure about typical, but here is rough estimate for the rock bottom of it: "feh" image viewer on Ubuntu/X11:

  $ strace -e openat -o >(wc -l) feh -F \
    one.jpg two.jpg three.jpg

  105
Re:Removing HTTP/2 Server Push from Chrome by the8472 on Friday August 19, 2022 @04:04PM (#32525408)
63 for me, and most of those are libraries which should already be in memory. Which is nanoseconds away from the CPU while servers are dozens to hundreds milliseconds away.
Re:Removing HTTP/2 Server Push from Chrome by jchw on Friday August 19, 2022 @03:46PM (#32525271)
That's not the whole story of course: there's an X server that feh is communicating with over a domain socket and usually shared memory, and X implements significant functionality on its end. Then there's drivers, and the stuff between these things.
Re:Removing HTTP/2 Server Push from Chrome by nousermane on Friday August 19, 2022 @04:04PM (#32525406)
Sure. And bloated websites aren't dropping from the race here, either. They are communicating, over HTTP (and maybe WS/SSE), with fair number of servers, that also implement significant functionality. Then, there are microservices, databases, network between those...
Re:Removing HTTP/2 Server Push from Chrome by jchw on Friday August 19, 2022 @07:25PM (#32527320)
Ultimately, though, even the script-free HTML pages that purists generally like and do not see as a problem do all of these things just as much. The point is that people have a lot of feelings about how simple, small and self-contained different software is, but realistically if you're not on a Commodore 64 they're all nightmarishly complicated. It only feels otherwise because encapsulation can be effective.
Re:Removing HTTP/2 Server Push from Chrome by LtWorf on Friday August 19, 2022 @07:33PM (#32527382)
an X server is not implementing as much functionality as a browser, but it's anyway needed to display our initial HTML
Re:Removing HTTP/2 Server Push from Chrome by jchw on Saturday August 20, 2022 @02:08AM (#32529586)
It's a bit nitpicky to go this direction, but in general having the display server implement all of the things X does is not necessary at all, especially because most apps, certainly browsers, essentially ignore those features of the display server, because they need more functionality and better performance.

That said, I would not be surprised if XFree86 was, at some point, significantly larger than contemporary web browsers, given the enormous amount of functionality that was loaded into it. Of course, modern web browsers definitely trump any old X server, so is this really relevant? I guess it depends. I get a huge sense that what people are longing for is a return to the "good ol days" when software was simple and fast, and X is a damning counter example, though it certainly doesn't mean that there's no point to be made at all, just that it is perhaps less black and white than people suggest.

I am not trying to say that feh is as complex or as slow as a web browser, only that in general, people treat the division of "native code" and "browser code" such that code running in a browser is always more bloated and slow. Somehow though, this is demonstrably not true. Looking at only very simple software with intentionally very limited scope is not going to give the whole picture. When you look at fairly complex software, the additional burden of having a browser underneath can fade away compared to algorithmic complexity issues and poorly optimized code. Your text layout and font shaping routines are probably going to struggle to compete with a browser if you have a very heavy layout to handle, and if you're doing accidentally quadratic things it's going to matter more than JIT or GC overhead.

Re:Removing HTTP/2 Server Push from Chrome by trasz on Saturday August 20, 2022 @08:24AM (#32531504)
I think X was kind of like this, yeah - in the eighties and early nineties; it's got its own chapter in the Unix Haters Handbook. There's been an incredible amount of work done to fix/work around its problems, and some of them - like security - turned up to be not practically fixable at all. Rewriting it into a properly minimalist design 20 years ago, like Apple did, instead of just now, would save everyone a lot of time.

And this time it's orders of magnitude worse.

Re:Removing HTTP/2 Server Push from Chrome by int_19h on Sunday August 21, 2022 @11:58AM (#32541418)
X was literally the thing they needed shared libraries for - it was too big to link statically.
Re:Removing HTTP/2 Server Push from Chrome by alerighi on Friday August 19, 2022 @07:21PM (#32527290)
There is a difference: a webpage is not a program, the program is the browser. The browser is a program to display documents, just like a text editor can display text, a PDF viewer can display a PDF or a video player can play a video.

The problem is that who make websites, instead of making documents, maybe built dynamically by the server and with some interactive elements in it, doesn't sent you a document but instead sends you an application that builds the document into the browser, basically turning an application that simply displays you document into a virtual machine that runs an entire graphical environment.

The fact is that most of the websites to function doesn't need a line of JavaScript, and still are downloading Mb of libraries to do what?

Re:Removing HTTP/2 Server Push from Chrome by slaymaker1907 on Friday August 19, 2022 @08:12PM (#32527642)
I think the web is a great application framework, but I agree some sites really don't need as much JS as they use. For example, my note taking setup is a self modifying HTML file that relies heavily on JS for obvious reasons. Your typical blog or news site really doesn't need it in the same way.
Re:Removing HTTP/2 Server Push from Chrome by alerighi on Friday August 26, 2022 @09:17PM (#32614590)
I think that one of the problem of the modern web is that it's seen as an application framework, and we forgot the origin that is the browser as a document viewer, basically.

Most of the problems wouldn't be even present if we reason in terms of documents, and in terms of operations that you can do on these documents (GET, PUT, DELETE, POST). You find out that for most website you don't need JS!

One could argue that JS is an optimization because you don't load up again the whole page each time you navigate to a different URL. That is false: if you cache the assets that doesn't change between pages such as stylesheets and images correctly, downloading just the HTML of the page is something trivial. Look at the number of requests that a webpage that uses JS does: is that more efficient?

Re:Removing HTTP/2 Server Push from Chrome by shadowgovt on Friday August 19, 2022 @10:26PM (#32528426)
> to do what?

Mostly to polyfill around the fact that basic DOM manipulation is garbage and the default UI widgets are ugly.

Re:Removing HTTP/2 Server Push from Chrome by okasaki on Friday August 19, 2022 @02:48PM (#32524698)
Even if so, the javascript doesn't replace the OS "bloat", it adds to it.
Re:Removing HTTP/2 Server Push from Chrome by mrjin on Friday August 19, 2022 @11:16PM (#32528706)
JS is the most abused stuff I guess. Current web apps is a "can we" rather than "should we" approach.
Re:Removing HTTP/2 Server Push from Chrome by allendoerfer on Saturday August 20, 2022 @02:52AM (#32529831)
Humanity is a "can we" approach.
Re:Removing HTTP/2 Server Push from Chrome by aaaaaaaaaaab on Friday August 19, 2022 @03:12PM (#32524945)
Yawn…

Strawman argument.

I just want to read a damn article. Why does it need to download hundreds of resources from dozens of origins? Reading a PDF article on my desktop touches exactly one file, the PDF. Ok, maybe some dylibs from the OS related to PDF rendering. But surprise! Browsers already have everything built-in for HTML rendering! No need to download an HTML rendering engine, because it’s already there: it’s the browser!

Re:Removing HTTP/2 Server Push from Chrome by vbezhenar on Friday August 19, 2022 @05:01PM (#32525855)
Basically because site owner wants to monetise your visit. Those who don't want to monetise you, usually don't put loads of trackers, ads and other stuff which is main reason of those hundreds of requests.
Re:Removing HTTP/2 Server Push from Chrome by staticassertion on Friday August 19, 2022 @05:28PM (#32526145)
Why is multiple files worse than one? PDF is an insanely complex format, I don't think the argument of "I can just read a PDF file" is strong.
Re:Removing HTTP/2 Server Push from Chrome by LtWorf on Friday August 19, 2022 @07:48PM (#32527494)
Because multiple files require multiple roundtrip times, more connections, and the total amount of data is higher because of all the waste that happens with headers.
Re:Removing HTTP/2 Server Push from Chrome by bruce511 on Saturday August 20, 2022 @03:15AM (#32529963)
The headers are not the wasteful part. Headers are typically in the low-hundreds of bytes. This extra data is insignificant as "waste" compared to the request/response content.

The real waste is in the time it takes to create and destroy the connection. (hence why http/3 switched to UDP, and also why multiplexing is a thing.)

Thing is, combining js and css on the server side into 1 file pretty much negates this speed benefit. I've been building sites this way forever, and performance is great. First page takes longer, but then those files are in the cache anyway.

The actual problem is Ads. They require tracking, and of course displaying. If you're looking for waste, or indeed why a server would bother with http/3 then look no further. No ads, no problem.

Unfortunately for those sites that rely on advertising for revenue, I don't have an alternative suggestion. I get it, ads pay for lots of the Internet I "browse". I'm not a fan of pay walls and subscriptions.

So http/3 is a solution to an economic reality - and really only benefits the ad-supported Web - but for them it is important.

Re:Removing HTTP/2 Server Push from Chrome by LocalH on Saturday August 20, 2022 @11:02AM (#32532517)
I/O. An anecdote. A friend of mine was modding a 360/PS3 game recently. He was trying to animate a texture by cycling through an image sequence. The first attempt read every image from disk each time, and ate shit. The second attempt pre-loaded them all, and it works perfectly fine