Schrep’s Blog

Schrep’s random mumblings

What can you do when your browser is 7 times faster?

August 22nd, 2008

Andreas Gal, Brendan Eich, Dave Anderson, Mike Shaver, and a whole host of other super-smart folks at Mozilla have been working hard to bring a Trace-tree based Just-in-time compiler to Firefox. I was a little curious about what sort of things you could do with this new found speed - so I hacked together a demo of some photo editing operations in the browser. It runs about 7x faster using the JIT than Firefox 3. From what I understand there are some very straightforward optimizations for the tracing work (basically specializing for the fact that we are loading/storing ints into the array) that can probably speed this up around 2-4x very soon.

Click on the image below to watch a 1 minute screencast of it in action - or you can try it yourself here (I’d recommend you use the latest Firefox nightly with JIT turned on - but the demo works in Firefox 3 and Webkit nighties).



79 Comments »

Great performance improvements coming for Firefox 3.1

August 20th, 2008

We know one of the things folks love about Firefox 3 is the huge performance improvements made over Firefox 2. We knew we could do a whole lot more - which is one of the reasons we decided to do a quick Firefox 3.1 release.

Boris Zbarsky landed support for querySelector[All] just before Firefox 3.1 Alpha 1.   Recently John Resig and Mike Morgan took the slickspeed selectors test from the Mootools project and updated it with versions of most of the toolkits that support native querySelector. 

The results are an impressive ~3-7x speedup!

The raw times looks like thus:

You can try it yourself here (make sure to use a Firefox 3.1 alpha or nightly build after July 22). Since all major browsers will soon support this feature the entire web is about to get a pretty big performance boost.

More great stuff is on the way for Firefox 3.1…


24 Comments »

Building the world we want, not the one we have

August 8th, 2008

Thanks to the hard work of Chris Double, Robert O’Callahan, Johnny Stenback, and many others the <video> and <audio> tags along with native support for Theora video and Vorbis audio are currently enabled in the Firefox nightly builds.   This will ship in Firefox 3.1 Beta 1 coming later this year.

This is not new news but I did want to provide my perspective on why this is important.

If you read the HTML1.0 specification from 1993 carefully you’ll notice it doesn’t specify the image format even though there are dozens of them. GIF is excellent for logos, line drawings, etc but is limited to 256 colors and is thus non-ideal for photos.  JPEG is lossy-compressed and thus great for photos but less suitable for vector art and drawings.   PNG came later to work around some issues in GIF and wasn’t fully and properly supported in Internet Explorer until version 7.  Before PNG was fully natively supported in all browsers there were many plug-ins to fill the gap.

A patent encumbered technology (GIF) critical to the web was replaced by a truly open and free format (PNG) first through plug-ins and then quickly after natively in browsers.  The HTML specifications did not specify a particular image format but a few became ubiquitous through common usage.

This is where I believe we are going with <video> and <audio> tags.  Right now hundreds of millions of users can view videos in their web browsers, but it requires one of several proprietary plug-ins which support proprietary formats to play.   This means if you build a website with flash/silverlight/WMV  video it will not work on millions of iPhones and other mobile browsers.  It may or may not work on Linux.  Getting it to work requires lawyers, money, and business agreements between multiple parties.

By shipping HTML5 <video> and <audio> with royalty free open source formats in Firefox we hope to make these formats ubiquitous through common usage.  Royalty free open source formats will allow all web-browser makers to enable native video and audio playback on all platforms, devices, and environments, without restrictions.  They will allow all open source products to embed native video and audio playback without fear.   They will allow web authors to use audio and video freely in their websites without worrying about whether a particular platform has a particular version of a particular plug-in installed.  As an end-user we soon won’t have to worry about whether we can watch video content from a particular website on our new phone, tablet, or PC because all systems can support open video standards.  Perhaps I’ll be able to watch the 2010 Olympics on my mobile phone.

True ubiquitous access to content.   This is the world we want.

There’s not much content encoded in Theora/Vorbis at this time - what’s the point?

Ten years ago there wasn’t any content in H.264 but it is fairly common now.  Until Flash video became common there wasn’t a ton of video content encoded in VP6.   New content is created all the time and transcoding to Theora/Vorbis is quite simple.   Shortly after Firefox 3.1 ships there will be almost 200M desktops capable of playing this kind of video.  Content should follow quickly.

I can already watch video using Flash, Quicktime, Sliverlight, etc so what’s the point?

Having native video/audio support as part of HTML5 along with open source and royalty free formats means that every browser vendor, device, etc can support this format.  If adopted widely it means that web authors will soon be able to use one format to target all devices.  As a native web technology video can now be intermixed with all other advancements in the web as seen here.

Doesn’t Theora kill battery life and/or eat CPU time?

Many systems today ship with some form of hardware acceleration for H.264, MPEG-2, and other formats which reduces their CPU usage and thus battery usage.   With adoption of the format we expect Theora to benefit from similar hardware acceleration in the near future.  In the meantime HD video at 5-6MBp playes smooth on modern system without any hardware assistance.

Doesn’t the video quality of Theora suck?

It is very watchable and getting better all the time with work such as this.

Are there any legal issues?

We’ve done a careful legal analysis of all known issues and to the best of our knowledge Theora and Vorbis do not pose any patent risks. They’ve been around for a while with no issues; however, there is always the risk of what folks call submarine patents but this risk occurs for every software developer writing any kind of software.  There’s also always a risk someone asserts a claim, which doesn’t necessarily mean that the claim has any merit.  We believe there are no issues, but if push comes to shove we can: i) evaluate any claim and determine if its meritorious; ii) use the power of the web to gather relevant prior art to demonstrate invalidity; and iii) remove or disable the functionality quickly if necessary as a last resort.

What about HD?

Theora can play and encode HD content.  Based on current implementations the video quality is not as good as H.264 but much can be improved.  In addition we’ve been talking to the fine folks behind Dirac and I’ve seen some very impressive looking 720P videos encoded in Dirac.   The good news is once we get the basic video/audio infrastructure into Firefox adding new codecs/formats will be relatively straightforward.  This is just the starting point to get baseline video capabilities ubiquitous.

Why didn’t you just license H.264, VC-1, MPEG-2, or <insert favorite codec here>?

We looked very carefully at this option and we could have very well done this for all “Official” Firefox binary releases at significant monetary cost to us.  But this had several issues:

This would solve the problem solely for Firefox users. We are more interested in solving the problem for the entire web.

Why not just use native Directshow/Quicktime/GStreamer on each platform?

We are working on this as well as you can see here, here, and here.  However, this approach has two major limitations: a) codec support varies dramatically from platform to platform and b) this does nothing for phones or other systems.  We wanted a baseline format that all web authors can count on in all environments.

This is awesome, how do I help?

Download a Firefox nightly build here and test it out here or on Wikimedia Commons.  Produce native content in Theora/Vorbis.   Help transcode other formats to Theora.  Tell your friends.


103 Comments »

New Adventures

July 28th, 2008

I’m moving on from my role at Mozilla Corporation to head up the front-end and platform development at Facebook.   I’ll be here for at least a few weeks after the summit so we’ll have plenty of time to catch-up before I go.

It really has been a singular honor to have been part of Mozilla and I’m hugely proud of what we’ve been able to accomplish together. We’ve shipped Firefox 1.5, 2, and the amazing Firefox 3 together, taken the active users from tens of millions to >185 million in almost 50 languages, achieved 50% market share in some countries, built a thriving Add-ons ecosystem, moved into mobile, scaled our operations across the globe, and most importantly of all continued to build a thriving, passionate, talented community that is a blast to be part of.  This is the first time I’ve decided to leave something I really truly love - I will dearly miss getting a chance to work with all of you every day. Everyone that I’ve met from the community has, and will continue to be, a huge inspiration to me.

I *know* that Mozilla will continue to kick butt without me - impossible to do otherwise with the strength, talent, and passion of the people here.

Rock on,

Schrep


71 Comments »

What’s next after Firefox 3

June 18th, 2008

8.3 Million downloads, 900+ articles written, near-universal praise of the product - I’m blown away by what we were able to accomplish with Firefox 3.  The leadership, talent, teamwork, and passion of this amazing group of folks has taken us farther than we ever could have dreamed.  We’ve said all along it will “ship when it is ready” and we wouldn’t ship it until the team working on it was proud to recommend it to their friends and family without caveats.  We’ve hit that quality bar without question.

If you’ve filed a bug, translated a string, written code, worked on an add-on, supported the development infrastructure, or helped to explain Firefox to someone else, you were part of making Firefox 3 a success.  I’m excited, humbled and proud of being a part of this amazing event.   I hope you are as well!!

What’s next? That’s simple: our next challenge is to deliver releases of the quality and impact of Firefox 3 with much greater frequency.  As part of this we are going to start doing smaller, shorter, more date-driven releases to stand in-between the Major releases (like Firefox 3) and security updates (like 2.0.0.14).   The first one of these is tentatively called Firefox 3.1 and is targeted for the end of this year.  This is a chance for us to continue to improve features like the awesomebar and to deliver advances to the core web platform at a fast clip.  We’ll do this work in parallel to the larger architectural work underpinning the next major release called Firefox 4 that will ship much later.

Ever since the release of Firefox 1.0 in 2004 we’ve had basically two kinds of releases:

Security and Stability Releases: the 0.x or 0.0.x series - these were strictly limited to security, stability, and small performance/footprint wins with an emphasis on security.  They were and are restricted in their scope to make the upgrade seamless and easy.  We pledged to not break add-ons or change user visible features in any obvious way to remove any concerns about upgrading.  This discipline, in combination with our awesome update code and infrastructure, is the reason why 90+% of Firefox users are using the latest version within 7 days of release.

Major Releases: Firefox 1.5, 2, and 3 are major releases.  These releases are an opportunity for us to add new features, polish existing ones, and implement and test new features for the web platform.  They may involve significant new features (places) and/or significant re-architecture of core components (reflow refactoring, cairo graphics, etc).  The longer development cycle gives us, web developers, and extension authors the requisite time to test everything before release.

Over the last several years a couple of key things have changed:

  1. Our community has grown dramatically - allowing us to get more done at once
  2. Our systems from release, to unit test, to performance analysis have gotten much more robust allowing us to make more changes with confidence
  3. Our recent move to Mercurial makes branched development much less costly
  4. The web is moving at a much faster pace, from new spec development to expectations from web authors about when they can use new features like offline web apps (this is a great thing!)

These changes have lead us to propose a new (for us - not new in the world!) release category:

Minor Releases: The proposed Firefox 3.1 release fits into this category.  Unlike security releases we can add new features or change functionality of existing ones. This includes user-facing features and web platform features.  The scope of these releases is by definition much smaller than Major Releases - so the scope of changes, testing time, etc will much reduced. These smaller releases will give us an opportunity to deliver upgrades to the core functionality of the web sooner and continue to keep us agile in responding to changing needs of users and web developers.

To put this another way:

We’ve already been doing 3 streams of parallel development (1.5.0.x, FF2, and FF3).  Our recent switch to a distributed version control system and our growing development community are allowing us to, in general, develop in a much more parallel manner.   Initial Firefox 4 work started almost a year ago and folks have already been cranking on Firefox 3.1.  But the branches are wider than that - you can see from the initial platform planning here that individuals and teams are focusing on particular feature or architectural areas and deciding whether is small (ready in 2-3 months), medium (6 months or so), or large (longer or not enough understood to fairly estimate).  Firefox 3.1 will include the set of smaller tasks that are ready in time.  Medium and larger tasks are being worked on in parallel so we have a constant stream of improvements ready for a release vehicle.

Whew!  Still there?  Now I realize that parallelism is no panacea and carries with it many challenges.  It will strain us in everything: people, tools, and process.  But our development community is talented, our tools are getting better, and our planning is getting smoother with every release.

I know we can do this together - you with me?

P.S. Further background on this discussion here.


33 Comments »

2.5x increase in market share in 6 hours

June 17th, 2008

Check out the by the hour increase here.


16 Comments »

14,000 Downloads a minute, 13 Gb/s of downloads, 2 Gb/s of HTTP traffic

June 17th, 2008

That’s the current status of our download day!  At this rate we’d have well over 10M downloads in one day.


20 Comments »

Where are we with Firefox 3?

June 9th, 2008

Thanks to the hard and dedicated work of the Mozilla community Firefox 3 Release Candiate 2 (RC2) shipped last week in an unbelievable 48 languages!   RC2 is 15th major milestone on the way to Firefox 3 final release:

Firefox 3 Usage

At the beginning of 2007 we had approximately 25k daily users of the early FF3 builds, that number grew to 50k as we approached Alpha 8 and last week there we over 2,000,000 daily users of Firefox 3.  The daily public builds, many many major milestones, and thousands to millions of testers are all part of our process to ensure that Firefox 3 is the best browser you’ve ever used.  We are still collecting feedback on RC2 and putting the final touches on the assoicated web sites around the Firefox 3 - but the final version is coming very soon.


51 Comments »

Where in the world do you use Firefox?

February 24th, 2008

When talking about Mozilla usage worldwide we have often talked about which locale of the browser people are using. We are quite proud of the fact that Firefox is available in 50 languages and the fact that the growth of other locales is outpacing en-US. The dedication of Mozilla localization communities worldwide are a very big part of Firefox’s success.

Since I knew I was coming to FOSDEM this weekend with many Mozilla localizers I wanted to know not just which language of Firefox people use but where in the world people use Firefox. John Lilly blogged earlier about how we use AUS data to get an aggregate view of Firefox usage. We looked at AUS data for December (comparing it against a Geo IP database) - the results were surprising:

Some details of note:

The combination of locale growth and worldwide usage growth are an amazing reminder of how Firefox and Mozilla are truly worldwide projects.


16 Comments »

Firefox 3 Beta 3

February 12th, 2008

Firefox 3 Beta 3 went live this evening including over 1350 fixes such as 92 performance fixes, 90 memory improvements, and a few new twists like the integrated add-on search directly from the browser:

During the last week of January Mozilla developers from Japan, China, Israel, Norway, Netherlands, Belgium, Germany, England, Ireland, Canada, Italy, Denmark and New Zealand all converged on Mountain View, CA to finish up Beta 3. It was really an amazing experience as 55 different people from around the world committed changes in one day to Firefox 3.

Give Beta3 a spin and tell us what you think. It is available in 34 languages each one of them the result of the amazing dedication of a volunteer localization team.


17 Comments »

Next Page »