So, anybody else dumb enough to want to try writing a slimmer browser?
Because it looks like that actually might be a good idea.
You know, for sufficiently masochistic values of good.
The problem is that I don’t think it’s possible. The kind of issues listed here, while stupid, are only a small part of what makes a modern web browser incredibly large. The work needed to performantly and correctly implement
dwarf all of the system call stupidity listed here. I suspect if you do the work to implement a web browser fully, you won’t have anything much better than what exists today. It might not be spazzing out with useless system calls, but there’s so much other crap that you basically need that it won’t matter.
I suspect if you do the work to implement a web browser fully, you won’t have anything much better than what exists today.
That’s pretty much the heart of the matter. Hell, even IE6 is usable under many circumstances.
The only reason why many of these browsers wouldn’t work today is because of modern TLS practices - v1.2, SNI, SHA-256, etc. Of course content is degraded, but it usually works. (unless it’s a SPA…)
The sad news is that you’re not likely to actually avoid much of this even by just dropping a GTKWebView into a barebones window, which is what most “lightweight” browsers aim for. Maybe start with netsurf, but it’s almost completely broken by modern standards.
Yup! goes off to implement a new web render engine
Call me in a few decades :)
Take the short route and become a servo committer!
The suckless folks took a stab at it: http://surf.suckless.org/
That’s just a slim wrapper about WebKit GTK. The surrounding chrome doesn’t do much, but WebKit itself will.
Back to firefox, it appears to have an unhealthy obsession with looking around for its rival.
Does anyone know why firefox is checking for a chrome installation? Is it sending that information somewhere for data collection?
It’s probably for importing bookmarks.
If it’s looking for bookmarks, scanning my $PATH for chrome seems an odd way to find them. The location where chrome keeps bookmarks doesn’t vary based on whether chrome itself lives in /usr/bin or /usr/local/bin.
Maybe it’s trying to decide whether chrome is installed before it goes looking for its bookmarks? Which is idiotic, of course, but purposeful and consistent with the behavior you observed.
It wants to import bookmarks every few seconds?
Some xdg fuckery? “Hey, looks like we’ve got some html. Are there any programs that can display this?”
I don’t run a desktop environment, but that doesn’t stop various programs from “integrating” with it. Usually I’m blissfully unaware that this is happening, but occasionally it bubbles up and things get downright strange, and then I know it’s time to delete all the configs.
Just a guess: perhaps it’s related to the “Make firefox your default browser” question?
This behavior reminds me of how chrome attempts to detect DNS poisoning attacks, e.g. if aslkdjakrgjalekrgjadlkjg resolves to something, then there is likely an attack underway. Maybe this is how they detect malware that tries to provide bogus certs to chrome? it would be easy to evade if so.
[Comment removed by author]
Probably not many, the directory would live in buffer cache. Although it does require a linear search through existing entries. (Directories are only hashed when they get to be a certain size, so it may actually be faster to loop over a larger directory than a small one.)
This is really interesting Ted.
I wonder if some of this weirdness (some obviously isn’t) is due to abstraction? A linear chain of abstracted API calls can easily hide repeated work.
Some stuff, like looking for another web browser binary, however, is just baffling.
Sadly I could not replicate firefox’s search for chrome on my FreeBSD machine. I’m sure there is some subtle difference in what I did.