Hacker News new | ask | show | jobs
by fsloth 4047 days ago
I think your intuition, that game engines are a poor comparison to a virtual machine and GUI targeting general purpose computing, is fundamentally correct, since they have mostly different design and technological constraints. Your detailed rationales are a bit off though. The parsing and image processing bit should involve only preprocessing of data and not runtime performance, and should not take that long anyhow.

The visible stuff a web browser does should not take exhaustive resources to get running nice and smooth. Also, since web is now most of all a UI tech in a sane world it should have the explicit design constraint of helping developers write fluid interfaces.

I'm not sure what the root cause of the slowness of web tech in general but I'm guessing there is a megaton of accidental complexity in the standards and implementing them is probably a small hell in itself.

From purely user facing side, and estimating intuitively the intrinsic complexity of the stuff a browser does, I would compare the experience just to the experience one gets on a modern desktop.

1 comments

The thing about the parsing and image processing is this. Browser JS is completely allowed to, say every few frames in a setTimeout() or whatever, dynamically generate a pile of bytes, create an image from that pile, attach it to the DOM, randomly remove some other node from the DOM, and finally change the position property on a third node and cause everything to be reflowed. This all being done from substrings that it randomly selects together and then eval's.

That level of pathological douchebaggery is rare (well, sorta, kinda) and yet browser vendors still have to write code that supports it as well as it can.

I'm not sure what the root cause of the slowness of web tech in general but I'm guessing there is a megaton of accidental complexity in the standards and implementing them is probably a small hell in itself.

Quite right! The problem with "slowness in web tech" is that there are just so many things that can be going wrong--slow CDNs, bad Angular code, whatever--that simply aren't the fault of the web, just the fault of sloppy developers. If the game engine bro who I've been going back-and-forth with wanted to claim that web developers were, in general, rather shit, I wouldn't disagree at all.

I think that having design constraints might help with this, but honestly we've all gotten so much from the sheer flexibility of these janky sandboxes that every time I see people pining for native apps I die a little inside.