News for hackers. Stuff that matters.
Re:Ōryōki Web Browser by jfe on Wednesday June 29, 2016 @03:09PM (#12003919)
This project is solving the wrong problem. It's not the interfaces of web browsers that suck, it's the gigabytes of RAM they consume.
Re:Ōryōki Web Browser by Drdrdrq on Wednesday June 29, 2016 @04:18PM (#12004482)
> This project is solving the wrong problem

No. This project is solving a different problem. Let it be.

Re:Ōryōki Web Browser by mwcampbell on Wednesday June 29, 2016 @03:55PM (#12004325)
Sometimes it's discouraging to think about how RAM requirements keep going up. The laptop I bought in 1999 had 64 MB of RAM, and that was enough for a comfortable multitasking system (dual-booting between Windows 9x and Linux with a GUI) for about two years.

Now, we have this, paraphrased from the 2012 novel _Off to Be the Wizard_ by Scott Meyer. Phillip, a time traveler from 1984, asks, "What on earth can a person do with 4 gigabytes of RAM?" Martin, from 2012, answers, "Upgrade it immediately."

Of course, things do get better over time, and some of those improvements require more RAM. Still, I wonder how much of the increases in minimum RAM requirements are actual progress, and how much are just waste. Is there even a way to answer that question? If I were to set up a machine (even a VM) running Windows 98 and Red Hat Linux 6.0 today, it probably couldn't do much on the current Internet, so I wouldn't be able to fairly evaluate how much the operating systems have actually improved.

Re:Ōryōki Web Browser by flubar on Wednesday June 29, 2016 @04:20PM (#12004504)
I ask myself this from time to time. It's hard to quantify quality, but I'm certain that the exponential increase of power in todays PC vs. that of a PC from the 90's is not reflected in an exponential improvement of the vast majority of software currently using this power. It seems that the more power that there is available, the sloppier the use of it. I wonder if someone already formulated some kind of law that describes this phenomenon :-)
Re:Ōryōki Web Browser by seanp2k2 on Thursday June 30, 2016 @04:29AM (#12007264)
This. I think about this all the time and discuss it at length with people. Lotus 123 could do things people use Google Sheets for today with a few orders of magnitude less processing power, memory, and network bandwidth. In terms of UX, a lot of the stuff was near-instant vs noticeably delayed today due to everything running in browsers.

I argue that the UX has actually gotten worse since software is becoming more bloated faster than the hardware improvements can keep up with. There are more layers of abstractions and VMs running VMs running VMs simulating DOMs listening for changes to objects to update models to trigger actions which bubble up to listeners which fire events which change data structures that eventually update some text on the screen. Consider what happens in the physical memory, at the hardware layer, to have a modern React app print a line of text when a text box is modified. Contrast this with what a terminal does and what happens in memory. Printing text to the screen in a "modern app" is now so complicated that it's effectively impossible for a human to determine the CPU instructions and memory manipulations required to do the things we're doing.

And what do we do? We make more transpilers, more frameworks, move more to the browser, split our systems across networks and around the world. Contrast saving a file to a floppy disk with uploading that same file to a "modern app" which stores it on S3 using Paperclip with Rails, as many modern apps do. Think about all the systems that file goes through, the network requests, the protocols involved, the standards required to make that happen, and the infrastructure which powers it all. Think about the data centers those VMs running that app run in, the people who oversee them, the tooling they need to run those systems. Think about all the project managers who had a hand in setting any of that up, the financial planning of each aspect, the development time spent.

Recall the time when one could reason about what goes on inside a computer at every level, when key presses registered immediately, when the memory allocations of applications and the OS they ran in made sense to humans. When it felt like magic instead of digging through a trash heap of ads to find the tiny sliver of what you needed.

what the hell are we actually even fixing anymore?

Re:Ōryōki Web Browser by NateyJay on Wednesday June 29, 2016 @04:27PM (#12004559)
Not a law, but a saying I've heard that captures the feeling. "What Intel giveth, Microsoft taketh away."
Re:Ōryōki Web Browser by kornholi on Wednesday June 29, 2016 @04:42PM (#12004664)
Unfortunately, Intel giveth no more :(

I've been hearing discouraging things from both architecture and silicon people at Intel. It seems like they lost direction, probably because of the recent explosion of mobile/ARM.

Re:Ōryōki Web Browser by mwcampbell on Wednesday June 29, 2016 @04:30PM (#12004587)
I know there are some changes in UIs and windowing systems that many people apparently consider indispensible improvements, but which I couldn't care less about. One example is the rise of compositing window managers. IIUC, a compositing window manager has to store a bitmap image of every window in RAM. But it would be fine with me if in this regard, our systems still worked like Windows XP, Mac OS 9, and X without something like Compiz, where things are drawn directly to the screen when necessary. That alone wouldn't get us back to a comfortable multitasking system in 64 MB of RAM, but it would be a start.
Re:Ōryōki Web Browser by fotcorn on Wednesday June 29, 2016 @06:10PM (#12005181)
Re:Ōryōki Web Browser by dmit on Wednesday June 29, 2016 @03:14PM (#12003956)
RAM is meant to be consumed. If your browser is using 50MB of RAM and has to swap every background tab to disk then you're not utilizing the resources of your computer, and getting a crappy user experience as a bonus.
Re:Ōryōki Web Browser by temp on Wednesday June 29, 2016 @03:23PM (#12004054)
>If your browser is using 50MB of RAM

If only that were a relevant remark. The tab with the linked Oryoki web page alone is using 250 megabytes for me. And a second tab of the same page is using an additional 230 megabytes.

Somehow I don't think that that's well utilized RAM for the ~350 kilobytes of web content. This page uses 200 megabytes as a tab, and HN isn't exactly a heavy page.

Re:Ōryōki Web Browser by kornholi on Wednesday June 29, 2016 @03:49PM (#12004267)
Seriously. I remember having 10s of tabs open in Firefox on an XP machine with 256MB RAM total, and it performed relatively well.

At first I was going to blame all of the garbage from rockstar brogrammers, but even the simple HN comment page tab is using 264MB of RAM on macOS. The browser itself uses an additional 208MB according to Chrome's task manager, not counting all of the extensions. Where is it all going? There's 10 lines of JS on this page and a tiny amount of CSS. Has Chrome become that bloated?

This is especially annoying when many modern "desktops" apps are just Chromium wrappers that bleed memory.

Re:Ōryōki Web Browser by hk__2 on Wednesday June 29, 2016 @03:54PM (#12004309)
Does it really use all that memory or does it pre-allocate it and does its own memory management inside? Not that it’s better, but that would explain why it takes so much.
Re:Ōryōki Web Browser by casta on Thursday June 30, 2016 @12:48PM (#12009835)
There is a lot of shared memory between renderers and the browser.

Your 208MB might not be additional, but a big subset of it could be shared with the renderer/gpu process.

If you want to know where the memory is going you can go to about://tracing and enable the memory-infra category.

Re:Ōryōki Web Browser by Pharaoh2 on Wednesday June 29, 2016 @03:55PM (#12004319)
It's not really chrome's fault. Blame it on increased screen resolution, copious amounts of available ram and a requirement to prefer using less cpu than less ram. Which also has the nice effect of using less energy.

If you have ram and it is not being used, it is completely wasted, if you have cpu cycles and it is not being used you are just saving on battery and not over heating the laptop.

Re:Ōryōki Web Browser by MichaelGG on Wednesday June 29, 2016 @04:05PM (#12004391)
>Blame it on increased screen resolution

Maybe on 3 or 4K laptops. But aren't most 1388x768 or something equally dismal? Which isn't far off 1024x768. Anyways, a 1080p frame at 32bit depth is only 8MB.

Browsers are hardly low CPU, either. I'll see things idling at 10% of an i5. Which is like 200%+ of CPUs used for web browsing of yesteryear.

All this, and web pages are slower to respond. I recently used a page that loaded a grid of images. Changing by battery/throttling had a 2s impact on load time. CPU was pegged during that time.

Re:Ōryōki Web Browser by dijit on Wednesday June 29, 2016 @03:19PM (#12004005)
Never assume your application is the only application running on my machine. And never assume I will be running only one version of your application.

My girlfriend who is a non-power user regularly has 2 browsers open and her laptop is swapping constantly with it's 8G of ram.

Re:Ōryōki Web Browser by overcast on Wednesday June 29, 2016 @03:30PM (#12004126)
Sure RAM is meant to be used, but not when the browser just consumes it forever, until it begins grinding to a halt. What could a browser POSSIBLY be doing with 4-500MB of RAM PER TAB? It's a huge problem, and extensions like The Great Suspender should not have to even exist.
Re:Ōryōki Web Browser by Touche on Wednesday June 29, 2016 @03:58PM (#12004339)
Each tab is a separate process. A separating operating system, you could say. Would you complain that your OS needs that much RAM? I wouldn't.
Re:Ōryōki Web Browser by overcast on Wednesday June 29, 2016 @04:07PM (#12004404)
Except we're not running an entire operating system in each tab. Everything starts fine, and then quickly consumes memory. How about we just stay fine? I've got entire operating systems running with less resources in VirtualBox.
Re:Ōryōki Web Browser by groovy2shoes on Thursday June 30, 2016 @03:48PM (#12011146)
My operating system uses less than a quarter of the memory that a single tab in Chrome uses. And that's with X11 running. (OpenBSD 5.9, btw).
Re:Ōryōki Web Browser by Touche on Thursday June 30, 2016 @05:01PM (#12011679)
What's your point?
Re:Ōryōki Web Browser by groovy2shoes on Friday July 01, 2016 @02:43AM (#12014265)
My point is that if you think of a browser as an operating system (which I don't), it still uses a ton of RAM, even in that context.

And, for the record, I would complain if my OS was a memory hog.

Now, get off my lawn!

/me shakes his cane at all the youngin's running around with their copious amounts of RAM

:)

Re:Ōryōki Web Browser by zymhan on Wednesday June 29, 2016 @03:15PM (#12003966)
Yes, RAM is meant to be consumed, but I still find it incredibly hard to believe that my browser NEEDS multiple gigabytes of memory. Regardless of how much I have to spare.
Re:Ōryōki Web Browser by pavs on Wednesday June 29, 2016 @03:40PM (#12004206)
Is this a problem a browser can solve? I mean modern websites are so large with so many crappy stuff and always loading something in the background - if you have 15-20 tabs with similar background loading web sites your browser is bound to consume a lot of memory.

If I am not missing something obvious, aren't we blaming the wrong thing?

Re:Ōryōki Web Browser by sotojuan on Wednesday June 29, 2016 @04:04PM (#12004383)
I'm not sure about that. Chrome's Task Manager says this HN post is taking 255mb and the front page 101mb.
Re:Ōryōki Web Browser by aeorgnoieang on Wednesday June 29, 2016 @04:42PM (#12004659)
That's weird. Chrome is only using 31 MB for both tabs for me.
Re:Ōryōki Web Browser by sotojuan on Wednesday June 29, 2016 @05:38PM (#12005025)
Do you think it's related to the display? I'm on a 15 inch rMBP.
Re:Ōryōki Web Browser by dmit on Wednesday June 29, 2016 @03:30PM (#12004125)
I see your point, but I don't find the state of things incredibly surprising anymore. Consider how huge modern web pages have grown, with a ton of poorly compressible media attachments, an embedded programming language that keeps track of plenty of state, and dozens of external resources that pull their own media and have their own state. Not to mention that we're in the middle of a responsiveness space race between browser vendors, and doing less CPU work by keeping more things in memory is one of the basic performance optimizations. With that said, as developers we have obviously been spoiled by the embarrassment of riches in terms of available hardware resources and have also contributed to the problem.
Re:Ōryōki Web Browser by cortesoft on Wednesday June 29, 2016 @04:00PM (#12004354)
I think that really depends on what you are asking your browser to do.
Re:Ōryōki Web Browser by JustSomeNobody on Wednesday June 29, 2016 @03:17PM (#12003979)
>RAM is meant to be consumed.

By users, not developers.

Edit: I know, I know, I know... But you all get my point.

Re:Ōryōki Web Browser by throwawaymsft on Wednesday June 29, 2016 @05:02PM (#12004788)
I understand your point, but there is inefficient vs. efficient use of resources. You could say it's ok to package a toothpick in a shoebox because cargo space is meant to be consumed.

When the ASCII text of a webpage is measured in tens of kilobytes, and the RAM in hundreds of megabytes, something is wrong.

Re:Ōryōki Web Browser by pen2l on Wednesday June 29, 2016 @03:39PM (#12004197)
There are solutions for this.

I assume you're running up on your RAM because (like me) you have tons of tabs open?

If you're one of those people, consider The Great Suspender: https://chrome.google.com/webstore/detail/the-great-suspende...

Also, have the right extensions. E.g. microadblock instead of Adblock Plus, etc. etc. There's a balance to be achieved somewhere in there. :)

Re:Ōryōki Web Browser by mwcampbell on Wednesday June 29, 2016 @04:21PM (#12004509)
I wonder if part of the solution is smarter caching at the OS level. Do all modern operating systems give the application a way to tell the OS, "This chunk of memory is a cache, so free it if it's needed for something else"? Of course, when the OS frees that memory, the app would need to know about that, so it can re-fetch or re-compute that cached data the next time it's needed.
Re:Ōryōki Web Browser by swift on Wednesday June 29, 2016 @11:23PM (#12006366)
They almost all do, yes. Android offers volatile ranges, OS X offers purgable pages, Windows offers MEM_RESET/MEM_RESET_UNDO. To my knowledge Linux is the only exception, because last time I checked they haven't merged Android's patches to enable the feature.
Re:Ōryōki Web Browser by peteyPete on Wednesday June 29, 2016 @04:01PM (#12004364)
I have good gear but definitely not the latest and greatest of everything. My laptop is a macbook pro from 3 years ago. My desktop has an Intel 2600k and 16gb of ram. Both run on SSDs. I use my laptop for work. Rarely have less than 20 tabs open in chrome, which stays open for days/weeks at a time. I've got VMs running and xCode, sublime, ios simulator, bunch of terminals, bunch of node apps, couple corporate sec products and incremental backup software, etc, etc.... Not a single thing is slow about anything. And I'm anal about things being slow. I hate waiting for anything. Its the same on my older desktop, which I also game on. I don't shut down my browser before playing games to free up ram, or kill photoshop, etc.

Unused ram is useless ram. Its a problem when you're always out of ram. But get an SSD for the odd times you swap. You won't notice it. But either way, the only time my browser is slow is if I restart it and it loads my previous 20-30 tabs all at once. It'll do its thing for 10-20 seconds then done.

I get its a lot of ram but what I don't get is why this is impacting people so much? In this day and age most of what people do is in a browser. And if you only have a tab or two and you're working outside of your browser, and you think your browser is killing your computer? Maybe its time to upgrade or add some ram.

You can get 16gb of ram for $50/$60... I abuse my machines with multitasking all day and none of them feel slow because my browser uses too much ram. Both have 16gb.

Re:Ōryōki Web Browser by spriggan3 on Wednesday June 29, 2016 @03:23PM (#12004056)
To be fair, the biggest offender in all this IS javascript in webpages. Though even more Javascript in the browser UI isn't going to solve the Javascript problem when it comes to performances.

Anybody can shift+Esc on Chrome and see how Javascript heavy pages consume a shocking amount of Memory.

Re:Ōryōki Web Browser by billyhoffman on Wednesday June 29, 2016 @04:18PM (#12004485)
This page on HN has 5 lines of inline JavaScript. It downloaded ~25KB of content, over 5 HTTP requests (HTTP/2 even), 3 of which are images, all of which are GIF images < 100 x 100.

This tab is consuming 98 MB of RAM. I am in incognito mode, with no plugins.

While crazy site do crazy things with JS and have crazy bad user experiences (TMZ.com makes 700+ requests and takes over 90seconds to load), 98 MB of ram for a HN tab is ridiculous. This has very little to do with JS.

Re:Ōryōki Web Browser by spriggan3 on Wednesday June 29, 2016 @04:55PM (#12004741)
No an average HN page consumes less than 20MB on my computer. And you didn't tell us how much RAM TMZ.com is consuming, 165MB on my computer (a 4GB RAM , quad core N2940 laptop), so 8 times more RAM.
Re:Ōryōki Web Browser by billyhoffman on Wednesday June 29, 2016 @04:21PM (#12004511)
+1. This page on HN, with 5 lines of JS and 3 tiny images, consumes just under 100 MB of RAM in Chrome in incognito mode.

Something is seriously wrong, and it has nothing to do with client side JS, or huge retina images, or CSS animations and rendering jank.

Re:Ōryōki Web Browser by robobro on Wednesday June 29, 2016 @03:16PM (#12003967)
I agree completely. Taking buttons off of the GUI and using different hotkeys doesn't make a better web browser. You just end up with a browser for hipsters.
Re:Ōryōki Web Browser by xlisx on Wednesday June 29, 2016 @04:07PM (#12004407)
A lot of the hate here comes from the fact that there are people who are being creative, and you aren't. It's easy to shut people down...try to help them, instead. It's an experiment, made public. What's the purpose of shitting on it?
Re:Ōryōki Web Browser by serge2k on Wednesday June 29, 2016 @05:10PM (#12004845)
> It's an experiment, made public. What's the purpose of shitting on it?

Providing data.

Re:Ōryōki Web Browser by partycoder on Wednesday June 29, 2016 @03:37PM (#12004183)
I think Mozilla's Servo (rust based) should help there, since rust offers a more refined memory model.
Re:Ōryōki Web Browser by jhardcastle on Wednesday June 29, 2016 @03:15PM (#12003962)
Don't you think that removing all the extensions, bookmark bars, and extraneous UI cruft will make this browser consume a lot less RAM? Seems logical to me.
Re:Ōryōki Web Browser by robobro on Wednesday June 29, 2016 @03:17PM (#12003977)
If your bookmarks bar is using up too much RAM, consider falling back to w3m, lynx, or wget.
Re:Ōryōki Web Browser by bduerst on Wednesday June 29, 2016 @03:18PM (#12003996)
You still have the duplicated processes across the different tabs to contend with. That's the real RAM killer.
Re:Ōryōki Web Browser by dmit on Wednesday June 29, 2016 @03:49PM (#12004269)
How much of the overhead is actual overhead though? Operating systems know better than to store multiple identical copies of the same shared library in memory, for example. And it's not like the process-per-tab approach has no benefits - you use more RAM to get increased reliability and security in return.
Re:Ōryōki Web Browser by bduerst on Wednesday June 29, 2016 @05:22PM (#12004931)
Chrome specifically runs these processes as duplicate services at the OS level so that when one fails in memory the rest don't.

http://blog.chromium.org/2008/09/google-chrome-memory-usage-...

Re:Ōryōki Web Browser by otabdeveloper on Wednesday June 29, 2016 @04:00PM (#12004356)
> ...it's the gigabytes of RAM they consume

We'd need a sandboxing and module system for Javascript to solve this. A problem that is both technically complex and not 'sexy', so don't hold your breath.

Re:Ōryōki Web Browser by amelius on Wednesday June 29, 2016 @03:17PM (#12003986)
I'm afraid that in order to solve those problems, the specs from W3C need to be radically simplified and improved.
Re:Ōryōki Web Browser by brianwawok on Wednesday June 29, 2016 @03:19PM (#12004002)
Why would I not want my browser to use RAM?

What else with my 16 or 32GB of ram am I going to do when I surf? I would happily give double the current gen ram for better performance.

Re:Ōryōki Web Browser by scrollaway on Wednesday June 29, 2016 @03:34PM (#12004157)
Don't assume everybody uses their computer like you do and only runs one browser maximized on their only monitor connected to their powerhouse of a computer equipped with a last-gen CPU and 64 gigabytes of ram.

For example, I sometimes play very resource-hungry games and like to have a youtube video on my second monitor while I play. But that's not possible on my gaming PC, so I have to youtube-dl the video first and run it in vlc instead.

Re:Ōryōki Web Browser by brianwawok on Wednesday June 29, 2016 @04:10PM (#12004424)
That seems like exactly what you are doing. So you want to run a game and a youtube video and browse at the same time, while on a low end PC. Cool. A lot of people don't use their computer like that.

I can do all of that at the same time as is...

Re:Ōryōki Web Browser by scrollaway on Wednesday June 29, 2016 @04:30PM (#12004595)
What kind of ridiculous, fallacious logic is this?

First of all, it's not a low end PC, it's an expensive gaming-dedicated rig barely a couple of years old. The amount of resources browsers consume is just ridiculously high.

Second, the argument that browsers should use all the resources and ram available in the world only holds if your computer is dedicated to web browsing. This is quite obviously false - I shouldn't even have to give you my case as an example. PCs are general computing machines.

Web browsers are too hungry for what they do. Not every tab is meant to run a full blown web app with webgl and megabytes of javascript code. The point I was making was that what I'm not able to do with Firefox/Chrome, I'm able to do with vlc. That is preposterous for something that wants to be "the future of the desktop".

Re:Ōryōki Web Browser by softawre on Wednesday June 29, 2016 @05:42PM (#12005046)
What sort of hardware are you talking about? Just curious.

I can youtube+[Witcher3|DarkSouls3|Skyrim+10GBMods] just fine with my 4k series i7, 16GB, GTX970.

Re:Ōryōki Web Browser by dijit on Wednesday June 29, 2016 @03:20PM (#12004021)
Then that should be configurable. Personally having 8G of ram dedicated to my browser limits the possibilities of the machine I have.

(remembering most Macs come default with 8G of ram)