Safari’s New JS Interpreter: SquirrelFish

There’s an announcement on the Safari blog about SquirrelFish, their new JS interpreter. To sum it up:

SquirrelFish is a register-based, direct-threaded, high-level bytecode engine, with a sliding register window calling convention. It lazily generates bytecodes from a syntax tree, using a simple one-pass compiler with built-in copy propagation.

Some performance data can be found here, as well as here, which even tests against Tamarin (slated for inclusion in Mozilla2). I think the motive for this move might have been best summarized here:

  1. I can imagine the “performance per watt� power consumption for SquirrelFish is also much lower. Good for my iPhone’s battery life.

Especially with the iPhone going 3G next week which will consume more power, making a web browser be as efficient as possible with CPU cycles not only makes the experience better, but will save battery life. This doesn’t just impact the iPhone as Google’s Android also includes WebKit.

David Mandelin has some analysis and comparison to the Mozilla work being done on his blog.

It’s pretty interesting stuff.

Rebreaking The Web

It’s happening again. Once upon a time, browser vendors started adding their own features without consulting with each other and agreeing upon standards. What they created was a giant mess of inconsistencies across browsers and platforms that is still in effect today. Ask any web developer and they can tell you of the pains that they have suffered trying to make seemingly trivial things work everywhere consistently. It’s no easy task. Before IE 7, even an ajax required something along the lines of:

var httpRequest;
if (window.XMLHttpRequest) { // Mozilla, Safari, …
    httpRequest = new XMLHttpRequest();
} else if (window.ActiveXObject) { // IE
    httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
}

That’s right, IE 6 didn’t support the native xmlHttpRequest object (more here). This is just one of many examples in JavaScript and CSS. document.all anyone?

The end result of this problem became to be known as the “Web Standards” movement. Simply put it’s an idea that code should follow a standard that results in consistent output across all browsers on various platforms. Write once, run anywhere. While it’s taken years for this to manifest, it’s slowly become a reality. Firefox, Safari, Opera have fairly consistent rendering (at least in comparison to the mess of just a few years ago on the browser scene. IE 6 was fairly poor in terms of modern web development, but IE 7 made progress, and IE 8 is Microsoft’s greatest effort to date to bring their browser up to speed.

Continue reading

Apple Software Update Results

I presume everyone remembers the whole debate about Apple misusing Software Update to push Safari to iTunes users. For those who don’t, I’d suggest reading John Lilly’s blog post on the topic. Several prominent Mozilla bloggers spoke out about that practice.

It did help their market share according to Net Apps, though we’re talking 0.07 for Safari 3.0 vs. 0.21% for Safari 3.1. Not major, but still noteworthy that it did get installs.

To put this into a little more perspective, Apple has over 35 million iTunes installations (thanks mostly to the iPod). How many of which use software updater, I can’t find any way to accurately guess.

As of the latest release, Apple now separated software updates from installs in their updater, but still keeps it checked by default. It makes me wonder how many people realize it, and how many just find the strange icon on their computer. This could backfire in the long run and become thought of as crapware when it’s not in fact a “free trial” but legitimate fully usable complete software.

I suspect this will be a topic of discussion for several months to come in the software world.

Firefox Sighting: Martha Stewart’s MacBook Air

Martha Stewart’s MacBook Air Running Firefox

The other day, Martha Stewart blogged about her MacBook Air, which seems to have been picked up by a lot of tech blogs. It’s not really news that she’s a Mac user. She’s been seen among many Macs before. She’s got an iPhone too. She does use a HP laptop as well including an HP touch screen in the stable, very appropriate I would say. As she explains:

I also use an HP laptop on a regular basis because I like to be well versed on both platforms and be able to multi-task.

What I did find interesting is that if you look at one of the pictures (you can find a larger one on her blog post), she’s running Firefox. Safari is also running but no windows are visible.

Update [3/22/2007 @ 1:45 AM EST]: Seems Martha updated her blog since I posted this as I didn’t see this before, and added:

Yes, I do love Firefox, great browser! Oh, and I also like the program Picasa to store and organize my photos. The computer I use for that is a Sony VAIO laptop with a 250GB hard drive and a 17″ screen. It also has a built in HDTV tuner and I will try to snap a picture of it soon! Perhaps I will have one of my cats near it.

Could it be she watching her analytics that closely?

Image via The Martha Blog

Meta Stupidity

As Robert O’Callahan, John Resig, Anne van Kesteren all point out, this idea of using a meta tag to select a rendering engine is bad. Here are my personal thoughts on the issue. Not as a browser developer but as a web developer.

Essentially the argument by the IE team is this: Rather than fix the problem, lets create a larger problem so the smaller one isn’t very noticeable.

Yea, that’s how I parsed the blog post. For anyone who disagrees, perhaps I interpreted it wrong because they didn’t select the correct parser because they didn’t include the following:

<meta http-equiv="X-UA-Compatible" content="IE=8;FF=3;raccettura=serious;OtherUA=4" />

All joking aside it’s an insane idea guaranteed to set things back.

Continue reading

Tab Impact On Total Time Spent

As everyone in the industry knows, Nielsen/NetRatings no longer relies on page views instead preferring total time spent. This makes sense since ajax applications can have 1 page view, but keep a user for an hour. Not to mention other things like video or Flash. The use of time spent is likely much more accurate. In my mind “time spent” is time actually spent on the site (I’m a literal guy).

This of course raises an interesting question. How do tabs influence this metric? Take the following situation as an example. A user visits a home page, and opens a link in a new tab. Then finds another link and opens it in a new [background] tab. That’s 3 tabs in 1 visit (assume visit to be 30 minutes).

Before tabs, most browser sessions would look like this:
Linear Pathing

There’s now an increasing number that will look like this (gray is a tab not in view):
Tabbed Pathing

If we assume total time on the site is time between the first and last page, we potentially undercount the total time on sites that list information (for example Digg). The total time to make those clicks could be < 10 seconds, but the time spent reading those two page alone might be > 10 minutes. Many tab power-users from what I’ve read around the web over the years essentially use them as a way to bookmark their “to read” list (including myself). It also undercounts sites like Gmail which are ajax based (1 page) but can be used for several minutes.

If we use javascript to “ping” (call back by placing a tracker gif) the analytics service every x seconds to see if the page is still open, we potentially double count since a user can’t be in 3 tabs at once. The clock would be counting 3 seconds for every 1 second the user is actually looking at the page.

This raises the question: are sites that are heavily used by Firefox, Safari, Opera and IE7 site underestimated or overestimated because of the way users browse the site? How do you accurately tell how long a view is when a user can have multiple tabs?

Another example is someone who keeps their webmail open in a tab all afternoon for easy access. They may only check it 1x measuring no more than 1 minute in actual attention. But it’s open for 5 hrs. What is the real time on the page? You can measure my interaction (opening/closing mail). But what if I’m reading an email for an hour (it’s a really complicated one)? How does that compare to just leaving it open in the background?

This is really no different than using new windows, the difference being that most people seem to have found windows to be annoyance, while tabs are a “feature”. The increase in usage and popularity in a time where visit length matters raises an interesting question. How do you measure it?

One assumption is that it’s just a small percentage of the population, which is likely true. The problem with this assumption is that it’s one subject to change as the browserscape matures and users learn about new features. Another assumption is to just account for all time a page is open, even if it’s not visible. The downside I see here is that it’s pretty inaccurate. As a content producer I’d like to know if my content is used, or just loaded on a users computer. If I were an advertiser I’d care even more.

I’m not sure how analytics firms approach this. In a sense it’s similar to the “hotel problem“. Perhaps just something you need to decide upon and live with.

Benchmarking And Testing Browsers

When people talk about open source they often talk about the products, not the process. That’s not really a bad thing (it is after all about the product), but it overlooks some really interesting things sometimes. For example open source tools used in open development.

A few months ago Jesse Ruderman introduced jsfunfuzz, which is a tool for fuzz testing the js engine in Firefox. It turned up 280 bugs (many already fixed). Because the tool itself is not horded behind a firewall it’s also helped identify several Safari and Opera bugs. It’s a pretty cool way to find some bugs.

The WebKit team has now released SunSpider a javascript benchmarking tool. Something tells me this will lead to some performance improvements in everyone’s engine. How much will be done for Firefox 3.0 is a little questionable considering beta 2 is nearing release, though you never know. There’s been some nice work on removing allocations recently. So just because it’s beta, you can’t always assume fixes will be minor in scope.

Another test that many are familiar with is Acid 2 which essentially is checking CSS support among browsers. Ironically this one too was released when Gecko is somewhat late in the development cycle.

Efforts like this really help web development by allowing browser developers to have a baseline to compare their strengths and weaknesses. Having a little healthy competition as motivation can be pretty helpful too ;-) .

Browser Wars On Google

If you search for Firefox using Google you’ll see this ad towards the top:

Firefox Adwords Campaign

Look over to the right side and you’ll see this:
Microsoft Adwords Campaign

Here’s a larger complete screenshot for anyone interested.

Interesting eh? They aren’t threatened though. Here’s another tidbit. A search for “Safari” brings up a Microsoft ad as well. A search for “Opera” or “Opera Browser” does not. A search for “Browser” will. A search for “linux” will bring up a few Microsoft ads as well as a Firefox ad.

The Illusive Gphone

So the illusive Gphone is finally announced, but not as a phone but an alliance.

One should note it coincides very nicely with last months announcement of Firefox Mobile becoming a priority. Firefox has a nice share of the Linux browser market. Extending it to mobile seems somewhat natural. A real win for developers. The same browser on all major PC platforms, and many mobile devices (on multiple carriers by different manufacturers) creates one of the largest platforms on the planet for a high level language like JavaScript. It also means it will be easier to port existing web applications to mobile devices knowing the browser is of the same lineage and honors true standards. It’s also nice to know that other mobile browsers like Safari on the iPhone are also very standards friendly.

Obviously absent on the list of members in the alliance is Verizon, AT&T, and Apple. I’d be curious to know what Apple is thinking. Could this be another Mac vs. PC? Or will Apple “Think Different” this time when faced with a pending platform war? I know what I would do. I’d start hacking up a Wine-like API for running Linux applications on Mac OS X. Since Linux doesn’t need to be reverse engineered like Windows, development should be much easier. Mac OS X having strong UNIX roots would also likely be helpful. At the end of the day, you would then be able to run Android applications on top of the thin(ish) compatibility layer. Casual users wouldn’t know any better. I guess in a sense Apple has started down this road. There is X11 for Mac OS X. They can of course keep it all under the radar for a while, just like Mac OS X for x86 until they need to play that card.

Om Malik makes an interesting point:

  • Google (GOOG) says it’s open source, letting you download it and do whatever — except that carriers can create their own locked-down versions of the software with Android. That doesn’t seem very open to me.

It does make me wonder if Google is doing the heavy lifting and carriers will just fork it when done and ship a closed version of the software and take advantage of not needing to pay licensing.

Very interesting stuff, but still doesn’t answer my question regarding bandwidth becoming fast enough, and affordable enough to hit critical mass. It still seems that mobile data services are just too expensive for many people to justify. Will this encourage enough competition in the mobile space to drive prices down? Or is there going to be some incentives to offer lower priced data services?