Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

izzy0242mr

macrumors 6502a
Original poster
Jul 24, 2009
698
492
There are regular debates between Chrome, Safari, and Firefox re: which is “fastest” (typically @ loading pages), but I was wondering what factors go into making a browser “fast”? I “built” a web browser app in Xcode a while back that uses the WebKit rendering engine: it’s literally just the webkit engine with a few buttons on top. It’s the most barebones of all browsers, and things like the rich version of Gmail are not supported on it. However, if I’m wanting to look up a website in a pinch (i.e., go from completely not running to doing a google search or going to a specific site in 10 seconds), it’s my go-to.

What factors go into making a browser “fast” and how do you maintain a speed that is pretty comparable to this barebones browser while also adding in a few “normal” modern features?
 
The speediest thing is what you don't do. Don't fetch a resource. Don't interpret some HTML tags. Don't run some JavaScript. All those things you don't do take exactly 0 time, so when you're trying to go fast, focus on not doing things.

There could be any number of reasons your simple Webkit browser is so much faster. I'll bet it comes down to what it's not doing. Start by asking yourself why it doesn't work with "the rich version of Gmail". If you can discover that, you'll probably have much of the answer, or at least the beginnings of an answer.

For example, if it doesn't interpret JavaScript at all, that'll be a whole lot of Things Not Done, especially in these days of myriad cookies, trackers, and tie-ins to social media.

If your minimal browser does interpret JavaScript, maybe it's only a subset, or it's an older version that doesn't run the trackers and tie-ins correctly. If there's any reason at all that's stopping some JavaScript from running or from loading other resources, then those are Things Not Done.

You could monitor or log the network connections your browser makes, and compare it to what other browsers do. Even a simple count of the number of different servers hit could offer some big clues. The next step up from a simple connection count would be a data count across all the connections to load a page (sum of all resource transfer sizes).
 
Last edited:
How about putting up a copy of your "barebones browser" somewhere, so that we all might try it?
I suggest putting the complete source project on a public repository like Github. Or maybe it's already stored on one, and all that's needed is a link.

A downloadable executable would also be useful, for people who can't built it themselves. Of course, that executable comes with its own set of risks.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.