upvote
Also mine is sipping on 53mb of memory with multiple tabs open - pretty awesome. I hope it avoids eventually turning into the type of experience I have with chrome and firefox where the browser ends up consuming 20gb of memory and has to be restarted periodically so I don't run out of system memory.
reply
Browsers are runtimes and webpages are apps. They just happen to be apps that are dynamically fetched over the network and are packaged as HTML/CSS/JS instead of as PE/ELF/Mach-O binaries.

Runtimes can have bugs or inefficiencies that cause them to use more memory than strictly necessary, but by and large most memory problems are the product of the apps (or webpages) themselves.

reply
The view of web pages as apps and browsers as runtime environments/OSes is reasonable but in my opinion it even reinforces the idea that it should be the browser duty to contain bad behavior from web apps/pages. Browsers are well positioned to do so, as they know exactly which resources are used by each tab , and how those grow over time. Also browsers already treat web content as untrusted (sandboxing, isolation), so it would be a natural next step to extend that approach to resource usage. It would match how Operating Systems work, where it's the OS acting as an "arbiter", not the userland application.
reply
I would love it if all the major browsers would agree on this. "Every tab is only allowed up to 100mb of memory, if a page needs more than that, optimize it." - Though a setting from the user to allow it for, say, online videogames or streaming sites or something, would be a good idea.
reply
Using more RAM could be a permission request.
reply
1. It would break a very large number of existing sites. 2. The vast majority of users aren’t able to make an informed decision. 3. Browsers already have heuristics to inform users about misbehaving tabs and suspend them. 4. It hurts performance. More pressure on gc, more cache thrashing
reply
It’s all about the UI. The browser vendor could make the informed guess and say “we think this web page is using too many resources”. Certainly Google could ascertain this during its spidering. Browsers already have several similar interventions e.g. no https, script taking too long etc.

Regardless, if it improved the experience then it becomes like Firefox was in the beginning, and Chrome in the beginning, a better performing competitor about to eat market share.

reply
Why do you think none of the major browsers have already done this?
reply
Agree, most people just want to visit a site and use it. Don't want to be bother with permission requests. You read the permission request the first 2, 3 times. Then just allow forever and you are back to the same scenario
reply
Because users would have no idea what to do.

I think the Corvette once had a special key for driving with enhanced performance, or maybe the key had to be turned to another position, I don't remember which. That caused so many service calls that later 'Vettes dropped it. And in the case of the Corvette, we're already talking about an enthusiast community that ostensibly actually takes an interest. Not so with people who call their browser "the internet".

reply
> Because users would have no idea what to do.

Agreed. Nice idea but it's too much.

reply
It is non trivial to determine if ressouces a site is using is reasonable or not. A web game may use lots of ressources and will crash if the OS suddenly decides to take some memory away.
reply
I am not following the logic.

Say I write a static html page that loads a series of images down the page where one image will fit on your screen at any time. If the browser loads them all into memory at once without releasing the memory or maintains the a fully rendered virtual page out of sight, is that bloat the app or runtime fault?

reply
Both.

Runtime can certainly be optimized, but the app can also virtualize or force unloading if it needs to.

reply
It's a difficult question because there are so many factors in dom/css that change the answer to 'is there a chance that the image should be rendered the next frame?' that it becomes really hard to implement a strategy for what content to offload to disk and when

If the runtime fails to load the offloaded data back in time there will be visible rendering artifacts so you really have to make sure your strategy is robust

reply
If the static page is badly written and does not instruct the browser to use lazy loading (using the loading="lazy" attribute on the img tag) and the browser loads them all at the same time, is that a problem with the page or the browser?
reply
The whole ecosystem.

Lazy loading for images was only introduced around 2019, not every website out there will have been updated since (and retroactively become “badly written”).

It is also not on by default, because the platform itself is too conservative and the implementation doesn’t allow zero breakage changes of defaults like that.

The tooling culture around HTML also isn’t such that you’d be prevented from deploying a site if you can use it but don’t, at least you’re not railroaded towards that.

Lazy should have been the implicit default and we should have gotten loading=“eager” instead. Same with having sane calendar controls, dropdown and collapsible controls, video controls so good we wouldn’t need vendor equivalents, light boxes for images and so on.

reply
> Browsers are runtimes and webpages are apps.

The internet was a better place when webpages were not seen as "apps."

reply
Though I agree, I am grateful that services such as my banking and national insurance are available via the browser and do not require me to install their own apps on each device. I have no banking apps on my phone nor desktop, Firefox is my window to all those services. I can put my trust in Firefox, I would not put my trust in each outsourced app each for each service I use.
reply
> Browsers are runtimes and webpages are apps. Surprised to see that.

I've been championing this mind set for nearly 20 years now. The message was more clear in the Flash era, but once you realize that your webpage is an (/a desktop) application that only happen to live in a browser - it makes a lot of reasoning and designing a lot easier.

reply
> I've been championing this mind set for nearly 20 years now.

I don't want to tell you you've wasted your time but it's fairly obvious that webpages are sometimes documents, sometimes apps and sometimes a hybrid between the two. For example, YouTube is clearly an app, but a webpage written predominantly in HTML and CSS is much more of a document than an app.

reply
how do you define a document?

i'm not trying to be glib, i get what you mean, i just wonder if you have an actual criteria. I've been struggling with this from time to time over the years.

reply
> how do you define a document?

I would say a contained set of words, sometimes accompanied by static visual data (e.g. images), which aimed to convey ideas or information.

For example, a post on a recipe blog website can be seen as a document, even if there are sometimes some interactive elements (like being able to change ingredient amounts based on desired portion sizes), and even if there's usually a CMS behind the scenes helping the website author update their recipes, as the written recipe is at the core of what is being transmitted.

On websites the wide array of interactive elements do blur the lines between documents and apps, but the web was designed as a document sharing medium first and had app functionality bolted onto it afterwards. It's perfectly possible to have a website with zero JavaScript.

I don't know if that fully answers your question, but hopefully it's of some use.

reply
Static (informative) content, for a first pass heuristic.
reply
You sir, you would be fairly dumbfounded to find that most people think that webpages are for showing trivial things founded on the backend side of them applications. Like when you want to change a filter on your amazon page and it suddenly give you a different page altogether, you know?
reply
Most pages probably don't need to be anything else.

I hope we can move past the movement of everything should be a web app.

reply
I didn't say Amazon was just a webpage, did I. Perhaps you're dumbfounded because all you use on the web are web apps.
reply
Should browsers enforce per-tab memory budgets?
reply
Maybe not by default but it'd be good to have the option, yeah.
reply
If you use a 32-bit browser, each tab is limited to 2 GiB. Firefox still publishes 32 bit builds for Linux.
reply
According to the Ladybird Discord, you're likely only measuring the root process there. Each tab is a separate process.
reply
deleted
reply
at least in osx i havent noticed other processes - have you?
reply
I can't find them in the Activity Monitor, but if you open Ladybird's own task manager from the inspect menu they are there.
reply
Ah ok... I must have been mistaken then - in Lady Bird with 5 tabs open (one of them a youtube video playing) - Lady Bird's task manager says it's using 2.2gb of memory.
reply
you have to put activity monitory into `All Processes, Hierarchically` to have the children nested, you can then see all of them. (assuming you are using activity monitor on osx)
reply
Here's a script that shows the process tree for Ladybird: https://gist.github.com/simonw/b9162f1741b96fea72b11c300b749...
reply
There is a simple fix for that in existing browsers - enable unloading of some of those tabs. Does Ladybird have such an option?
reply
IIRC the Ladybird creator said that the Chrome memory footprint is largely a tradeoff of cache-sizes vs. speed. I still hope they will let users control that tradeoff manually in Ladybird
reply
> Also mine is sipping on 53mb of memory with multiple tabs open

Finally a browser for the Ozempic era. Time to get healthy (message to the incumbents).

reply
A web browser feels more amenable to AI than most other software projects.

You have great specs for prompting. You have great test suites that you can use as verification criteria. Literally all meaningful implementations of these specs are open source, baked into the weights to some degree, and have many people writing publicly about their internals. You aren't really designing your own features from scratch; a lot of your work is of the "this site doesn't work, please fix site" kind, and that, given decent enough tooling which browsers do have, is also relatively easy for AI to do.

This is very different from game dev for example, where you're working with an engine which hasn't been designed for headless operation from the outset, and your actual goal is max(fun), not max(correctness), which is a lot harder to quantify and requires taste, human testing and many shots on goal.

Sure, you still need human devs in charge to take care of the architecture, tech debt, code quality and such, you can't vibe code a truly great web browser, but those humans can be significantly accelerated by AI.

I know the Ladybird folks realize this and this certainly isn't news to them; Andreas seems plenty AI-pilled to me.

I think AI is what's finally going to break the web browser monopoly.

reply
great comment, web browsers used to be kind of a doomed project. I wonder if there are any other types of programs that are optimal for AI.

First thing that came to mind is the age-old advice to never roll your own crypto, it likely still holds but I wonder if the risks of that have changed, I guess it did but because it is adversarial and both sides have AI it evens out.

Maybe we start to see more completely new Operating Systems?

reply
It’s really beta quality, not alpha. I would have been comfortable saying it was alpha quality prior to this.

Very solid work.

reply
Very cool. Someone has been working on bot detection. I was curious if they had to deal with it. It turns out yes, they have. Apparently they have to pretend to be Chrome or some websites will let them in.
reply
> or some websites will let them in.

Will *not -- I presume?

reply
Every browser will forever be KHTML, like Gecko.
reply
I tried to use it as well and most things seemed to work, but as soon as I tried to login somewhere using a passkey that didn't work. With more and more accounts I have being behind a passkey that is quite the limitation for actually using it. Looks like there are already multiple issues open for it so I'm sure they will eventually get to it, especially as more and more people and services switch to passkeys.
reply
How do you manage your passkeys across devices?
reply
It's not fully written from scratch anymore they are using Chrome libraries. Edit: Nevermind, the kinds of libraries it uses are used by Firefox too.
reply
I don't think this is true. Their FAQ page states the following

> The focus of the Ladybird project is to build a new browser engine from the ground up. We don't use code from Blink, WebKit, Gecko, or any other browser engine.

And I was unable to locate any chrome library references in their github repo.

They do of course use third party libraries like ffmpeg for video parsing and skia for image parsing so its not entirely "from scratch" but afaik the actual browser part, html, javascript, css, is entirely from scratch. As their FAQ page continues:

> we make use of 3rd party libraries for common functionality (e.g. image/audio/video formats, encryption, graphics, etc.), including some of the same libraries used by other browsers.

reply
They use ANGLE now which whole original purpose is a library for Chrome.
reply
That's a graphics abstraction layer. How would you implement webGL? Reimplement it for direct3d, metal, opengl and vulkan? Would you not think of a way to abstract those right away?
reply
Your right, Firefox uses all the same shared libraries too.
reply
Yeah I'm actually surprised how well it's working on complex multimedia sites given that it's only in Alpha...
reply
> The only minor issue: page scrolling is a bit jerky.. not much.. just a little bit.. it's noticeable.

This actually gives me confidence that the important things are being done first.

Sounds like a great alpha!

reply
Sounds opposite to me. iOS targeted framerate, Android targeted Java. iOS has a butter-smooth rep. Android is still janky AF.
reply
I can't tell.

I use Linux (mainly on X.org) and macOS (on Intel) and Android. I support others' iOS devices though. I can't see all the smoothness stuff people talk about. I am old, not a gamer, and with my glasses on, I have good vision, but it's all literally invisible.

I dismiss all talk of framerates and smoothness and all that as hype mingled with audiophile-style self-deception. I cannot sense it myself so I don't care and don't really believe in it.

You do you. I merely want to say that for all the talk about "buttery smoothness" etc. there is a contingent of us who can't see it and don't care.

reply
>a new browser written from scratch that actually works!

Big Browser wants you to believe that coming up with one is impossibly hard. It's not, even less in the age of AI.

reply
Writing a browser is easy. I wrote one in the 90s that only supported a subset of the standards so I could browse warez sites without having to risk drive-by attacks and pop ups.

The hard part is writing a modern browser that’s feature-capable while being performant and which renders all those broken sites “correctly”

People have already tried throwing tokens at this problem and yet nothing usable has emerged from the effort.

reply
This. Creating something that will render a subset of html/css/js that you care about is easy. Creating something that will render all of the standards, and all of the broken shit that has accumulated over the past ~30 years is incredibly hard.
reply
You mean “until now”, don’t you?
reply
Ladybird is not a "throw tokens at the problem" project, and has been going much longer than doing so was even possible.
reply
Just to be clear I do not mean to discredit Ladybird but the opposite, encourage others to take a stab on projects like this one :).

I am aware Ladybird is not an AI-driven project, but I'm quite sure you can get a very decent browser these days just "throwing tokens" at it, and at a much lower cost than the billions spent on Chrome etc.

reply
Its easy to get 80% there, and sites like HN render easily. But almost all big sites get some render issue, and then you start going down a rabbit hole of fixing site by site; a never ending job basically. Thats why it feels like its a good job for an AI, but the issue ends up being the human element of clicking, scrolling, 1000s of different computer setups etc.
reply
Do it then. Prove us wrong. Because the last time it was attempted the project proved to be unusable and unmaintainable. Eg

https://chebykin.org/posts/writing-browsers-with-ai-agents

reply
They never released anything before doing so was possible, so it's not a convincing argument.
reply
> They never released anything before doing so was possible

False. I tested Ladybird on Serenity OS and wrote about it in March 2022, before ChatGPT was released (Nov '22 from memory):

https://www.theregister.com/software/2022/03/31/serenityos-a...

reply
Not to shill too hard but it depends what you mean by “release”. You have been able to build and run it yourself for years.

Andreas called me out of the “first Ladybird use in the wild” I think two years ago. I was using it to post read and post to Hacker News even then.

They definitely use AI. But this day certainly would have come even without it.

reply
Ladybird originated in SerenityOS and released for years before ChatGPT was a thing.
reply
deleted
reply
As an application security engineer, I thank you for your continued support of my job security.

I wouldn't touch a vibe-coded web browser even in disposable VM. It would be absolute swiss cheese in terms of security.

reply
I would be more convinced if you pointed at a vulnerability. To be clear, I am sure there are some. Maybe not as many as Chrome.
reply
I'm not in that business but I'm used to people thanking me for stuff so I'll take yours as well :).

I'd say enjoy it while it lasts, the trends I've seen do not seem to favor your skills, and I've heard it's quite hard to pivot late in life.

I hope you're lucky enough to have a cushion to fall into (inheritance or wealthy in-laws, etc).

reply
As someone in the security business who cannot hire nearly enough and never has been able to:

The trends you see aren’t trends.

reply
I’m relieved to read this. Would love the link to your easily made, secure, feature rich browser that my Banks’s website sees and says “come on in”. Glad the problem was solved already, AI ftw again and again
reply