by valarauca1 · 11y ago · 0 comments
I've often wondered why OS's just don't host browser render engines internally and draw their UI with that.
Well I don't for long, I know HTML is much younger then X. Also browser engines are massive resource hogs. But with the advent of 8-16+ GB of ram in consumer computers can we really say 2-3GB for windows rendering is heavy?
Especially if it offers that much empowerment to developers.
This attitude is why we have phones with 1G of memory and 1Ghz+ CPU's lagging when just trying to read email.
Yes, there is more memory available than before, but that doesn't mean we should just waste it for useless stuff.
For example if we eat 2-3GB of memory on a system with 8GB of memory, thats over 25% of the usage. Then some applications that are actually used. (Let me use my own process mem counts here...) 1.3Gb for Firefox, 0.6Gb for Android emulator, 0.5Gb for Visual studio....
And there would have gone over half of the 8GB of ram!
I am sure my current memory usage would be half of what its now if developers would actually give some shit about memory usage... Not just allocate too much memory because "there is so much memory it doesn't matter"
I disagree. I think the point is that it's not useless, by its own existence. It saves dev time (which allows more - and better! - programs to be built), it allows richer features and interactions, it lowers the barrier to entry for maintenance work, and most of all prevents constant re-inventing/implementing the wheel, which is reflected to the user in a lack of many common types of bugs, annoyances, and accessibility issues.
No need to add extra layers on top of those.
CSS is, by far, not a good way to try and do UIs. It sort of works, and it is getting better, but it started out with lots of legacy cruft and things have only gotten worse.
One can make any sort of layout imaginable in any of the modern UI frameworks within a few hours.
Want 3 columns boxes at a precise position in CSS? Well thankfully the latest version of the spec has support for that, but up until very recently....
But for code running on the platform, you can take any 1st year CS student who has passed a class or two and have them put that sort of app together in Swing. WPF is a bit more work due to the data binding magic, ignoring that the layout stuff is also incredibly easy!
On the web, getting data is the easy part, making the UI is the hard part. On the PC, getting the data is the hard part, putting the UI together is easy!
Compare the richness of apps even on mobile phones to what you get in the browser. Sure if you hire top notch web developers who have been studying web development for 3+ years you can get something that is just like an app, but holy crap.
tl;dr HTML+CSS is the Win32 of layout engines.
CSS is good for styling but not for layouts.
I want to build unbreakable responsive lauouts!
people used to complain about Firefox hogging memory, I think it's Chrome we should be worried about...
At my day job I create apps for TV decoders. Most of those render and run in browsers.
The boxes have 1 GB memory, the browser uses just a small fraction of that. A lot of the browser memory is used for graphics (think bitmaps), the JS-heap is only 4 MB, not sure about the rendering engine.
Granted, we use SVG, not HTML/CSS, for most of these apps.
A lot of these apps wouldn't exist if they couldn't have been built quickly and cheaply.
http://www.chipworks.com/media/wpmu/uploads/blogs.dir/2/file...
You see those little dots? Those are individual silicon atoms from one of a few fins in the gate on Intel's 22nm node.
Also, I Am A C Programmer. I Think Everything Should Be Written In C. C Is Close To The Hardware And Is Faster And Use Less Resource Compared To The JavaSlow and WebKittenz and CSS. But I Like CSS Because It Has C In It. I Am A C Programmer.
Get back to me when we have compressed ZRAM implementations and Same Page Merging everywhere to save memory on each Chrome process and each JS interpreter instance. Don't you want to do the green thing?
When chips started hitting the limits of the photo-lithography process, they switched to lasers, UV, DUV, and now EUV. Transistors start leaking so they redesign them time and time again. We've gone from completely 2D Circuts to 2 layer 3D to what's it at now 16 layers? The end is nigh and has been since Moore came up with that god damn law.
My point is that there's a lot a really brilliant people in the field who've been working for years if not decades to address problems we haven't even had yet. We're perpetually on the verge of a crisis, and simultaneously on the verge of a solution to said crisis.
We're in an age of ridiculously powerful machines that we don't know what to do with. If suddenly all progress halted in chip development and we had to make due, we'd probably enter into an age of hyper optimization where software engineers would be scrutinizing every clock cycle furthering the annual performance gains we've had for the last 40+ years.
Also, even if native apps were "more expensive", that's only from the developers' perspective -- and for a good app, the number of users far outnumbers its developers, so any "increased resource consumption" gets foisted on and effectively multplied by all the users. Only the developers get any benefit from this; but even then, since developers are themselves users, if they use apps that others have similarly developed with this culture of "selfishness", they get to experience the "increased resource consumption" too. In the end, I don't think this vicious cycle of waste benefits anyone except the hardware manufacturers.
In general, I think treating resources like they're infinite and "there will always be more" is almost certainly guaranteed to make it so there won't ever be enough.
This Firefox.html is a fun experiment to push boundaries, like WebKit.js and all the other interesting things you can do with JS and an HTML rendering engine (e.g. see Fabrice Bellard's complete PC emulator in a browser), and somewhat reminds me of other tricks like nesting VMs.
> it's likely much more expensive to code native apps
No, and not even close. Web tech is primitive compared to the native SDKs and there is no sign of that improving anytime soon. All what happens is reinventation of some MVC and reshuffling the libs.With this setup I can boot to a system that uses about 1.5GB of RAM occupied with Firefox with a couple of tabs open.
Some stuff that I'm trying to eliminate that's a big memory hog: dropbox (150MB), skype (150MB).
Developer arrogance like this is exactly why all software sucks. It's actually a lot worse than it used to be due to mobile phones, which are hugely underspecced but attract the same mentality of "my code is surely the only important thing users will ever run so it's ok to use 700MB for a browser".
I believe Windows 8 can do this.
Even in a thread earlier today there was a post about the state of desktop web apps... node-webkit and atom-shell aren't bad options either.
I always wanted to like XUL, but a shell mode for HTML+JS that can have more control over iframes than is allowed in the browser... it would definitely be interesting. It would be more interesting if it followed node's API (at least for JS-level modules).
Mozilla does that with XUL. That's what they're trying to get rid of.
Why spend time on other UI systems that will only end up requiring more work for a visually worse result?