Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
@korrat I didn't try it yet but I installed it and it looks pretty interesting! It unfortunately seems that even they also use webkit2gtk. However it's only one of those processes due to the browser being single tabbed. It still uses 250M which is more than I'd expect from a web browser but it's much better than 8GB of course. Thanks for mentioning this! :)
sbiewald400914dUnfortunately webbrowsers are complicated as fuck.
A reasonable useful browser nowadays has to do (just to name a few things):
- Video/Audio en-/decoding and streaming (both directions)
- Game controller user mode drivers (yup)
- 3D rendering
- Support a dozens of image formats
To hope this (and more) can be done in a "lightweight" manner is just silly.
Oh and the tabs _are_ properly isolated and locked at least on Chrome (blink engine). They can only do one thing: Calculate, access itself and do IPC. Not more not less, not even access X11.
@theuser I have disregarded user requests enough times to not be bothered by that. My projects, my rules. Browser vendors can do the same thing (and with the ridiculousness of some web devs' requests, perhaps they should).
For example, I can count the amount of websites that I'd reasonably allow to play media content on one hand (YouTube yes, a random news site no). I can count the web apps that use WASM as far as I'm aware on one hand (Google Earth and such). It is also one of the few websites I know of that use 3D rendering. I do not think it is reasonable to do gaming in a web browser, the usermode game controller drivers are lost on me (those should be in the kernel anyway).
My browsing habits usually include doing research, reading articles, tutorials and such. My social media is not part of it, these run in dedicated applications. If the above are what make webkit2gtk based browsers and their processes so bloated, then perhaps it should be optional.
homo-lorens624114dThe standard includes 3D transforms, audio and video processing, two separate languages and an interface between them, a wide array of interfaces soon including an asynchronous filesystem API.
A tree with multiple parenthood using the shadow DOM is the basis for rendering, styled by the most complex styling parameter system to ever exist.
I understand your frustration but this isn't on the browsers.
sbiewald400914d@Condor What @homo-lorens means is the key point. It is also the reason we only have thre e relevant browser manufacturers left (Google making Chrome/Blink, Apple with Safari/WebKit and Mozilla with Firefox/Gecko).
Safari is - besides iOS and iPadOS - closely dead (ignoring the small browsers using WebKit with neglectible market share) - there are no other relevant engines. Microsoft gave up, and Firefox is in steady decline, with one reason being they can't keep up with Google's new standards.
By the way, gaming in Webbrowsers recently increased in popularity with Google's Stadia and Geforce something...
And I disagree with you in that drivers should reside in the kernel 😉 (but they still should be provided by the OS if possible).
Nanos1055614dDo you get memory fragmentation issues ?
Just, I'm experiencing severe slowdown when I've had my browsers open for days, with hundreds of tabs.
Sometimes the HD/SSD goes into 100% usage for a while.. (I'm not sure if that is W10 OS issue, or Firefox browser issue.. )
But if I don't reboot every few days, it just goes like treacle until I close all my browsers !
It feels like memory needs a good defrag..
I dunno, thoughts ?
No one, and I mean no one, has ever asked for the megabyte size libraries that change a button's size on hover (that doesn't make sense since most users access websites from their fucking phones). It is all because "ApPlE aNd GoOgLE lOoK nIcE sO wE mUsT tOo".
Fuck the average designer that just follows whatever Google and Apple say is the new cool and fuck lazy developers that can't be arsed to think and just import the sun's mass in node modules to change a color at runtime. Fuck I hate web development.
@Nanos Not really, I run all my systems' rootfs on SSD so fragmentation isn't an issue. However, browsers do flush a lot of data to disk, very often (several times a second). This is mostly for caching and things like that. It is *very* noticeable on systems with CF card storage (so flash modded IDE systems), and I reckon on spinning drives as well... On an SSD the writes are still there (wearing out the SSD), but it's less of a usability issue.
Jilano3116114dI'm curious about what websites you were using that consumed so much memory. I recently compared Reddit with old.reddit, libredd.it, and teddit.net and the difference is staggering.
That new design is both awful and bloated as fuck.
Jilano3116114d@Condor Understandable, no worries
Do tell if you ever find something better!
PS: I remember a browser called QuteBrowser. While it was advertised for its full Vim control by default, I wonder how it'd do against the ones you mentioned
PS2: Have you tried on a Windows machine just for fun? I don't think I've ever gone above 2/3GB with 20+ tabs on my work machine
@Jilano Haven't tried Qute yet, will try it out asap! Would be very interesting if it uses something other than Webkit2Gtk. I've "written" a web browser as part of my other rant as well. It's fairly barebones (takes URL as an argument only) and many UI features such as search are missing. However the Webkit2Gtk engine does make the rendering part just like any other web browser (because at the engine level it pretty much is).
I don't use Windows other than Windows 7 and try to avoid browsers there (given Win7's current unsupported nature). But yeah both web browsers (usually Opera) and the system itself are highly adaptive to the memory configuration they are working in. I've got some VM's running off 2GB RAM, and it runs flawlessly. Granted the amount of tabs is usually very low and sessions are short, that's likely also relevant.
Oktokolo182314dThe chance to restrict browser weight is over. It is too late for that now as everyone is using the browser as a second OS already.
The war is lost. The attack surface is OS-sized and there will always be 0days left to find.
The only hope now is to translate the browser and all libs they use into some memory safe language so the next big worm will just crash all browsers instead of creating a botnet consisting of the entire Internet...
Well I can see it being a problem in virtualized environments.
Some of our clients were running virtualization and our app just crashes there (Not enough RAM, we need for some workloads up to 2GB per TAB).
But from consumer perspective, all chromium-based browsers run pretty fast. When I look at my mother using chrome, she has like 5 tabs opened. (k I put 16 GB ram in her PC just in case).
Even on my working PC with “only” 16GB ram and 3 to 5 instances of Visual studio I don’t have performance issues.
If there is ram available, why not use it ? (Yes chrome can go a bit overboard sometimes).
For 1 process per tab, I don’t care about security. I just don’t want spotify / youtube to freeze when I’m testing my own app with some BS data set taking up to 3.2 GB of ram
Nanos1055614dI finally close my last Firefox browser tab and my available memory increases from 1Gb to 17Gb..
What was it doing with 16Gb on one open tab.. ?
dder226014dMy two cents on the process per tab:
Once, the OS can schedule better on different cores than the browser can via threads (I reckon, not 100%sure though)
Second: security, each different processes have different address spaces (hence increased ram usage) which makes timing attacks (read: spectre) a lot harder than inside a single process.
Also unused ram is wasted ram.
junon296914d> Imagine your text editor being as bloated as a web browser. Imagine it being prone to crashing tabs like a web browser. Imagine it being so ridiculously slow to get anything done in your productivity suite.
VS Code people:
@dder Yes, multithreading does allow the OS to schedule processes on different cores, and even to move processes between them. A distinction must be made between process threads and processor threads though. Processor threads (i.e. hyperthreading) is using the same core twice. Perhaps like using a thread more than your total in make's job count. Process threads on the other hand are lightweight processes, they get their own PID and such, but are apparently faster to initialize and tear down than a full process fork.
Unused RAM is wasted RAM also needs context. If you say that to an Arch/Gentoo/etc user who just spent a week on setting up a WM and says "this uses only 200MB" then yes. What's the point if you won't run anything else on it? But to excuse the behavior of wasteful programs is not. We sysadmins can and do fill up our memory easily. It's not a matter of total memory in the system. It's what the combined workload will take, how many tasks I can let this server execute.
As far as multithreading goes, I think it should be a fundamental design element in your code, like your functions would be. If you have a block of code that can run on its own independent of the rest of the code, then by all means isolate it so that it's easy to assign it its own thread of execution. However, it appears that most web browsers just run a webkit2gtk process for each tab, and that's it. Perhaps that's why it's so easy to snap them out of their existing window and into a new one... It's already its own process after all.
Side note: it seems that even a single devRant tab consumes no less than 1GB of memory. This is absolutely ridiculous. Whatever UI elements on top of the engine that Firefox needs half a GB in its main process for is beyond me. How the Web Content processes can consume 300+MB is beyond me, devRant isn't heavyweight as a website at all. And the Privileged Content process is literally consuming as much as my OS kernels with all their drivers would consume, 5 times over.
Nanos1055613d> Imagine your text editor being as
> bloated as a web browser.
Oh you talking about Windows Notepad !
Moving its window from one graphics card to another, it slows down to a stop..
Once you have +1mb of text it goes from snappy, to crawly..