Enabling hardware acceleration on Firefox 4

Red Panda

A release candidate of Firefox 4 has finally been released after a very protracted beta phase (over six months), and the final release should be coming very soon. One of the major new features is hardware acceleration – using your graphics card to help to make the browser faster and more responsive – and it’s available to varying degrees for Windows XP, 7, Vista, Mac OS X and Linux users. XP users get basic DirectX 9 acceleration, Vista and 7 users get DirectX 10, and if you have Mac OS X Snow Leopard 10.6.3 or above you get to use OpenGL.

Hardware acceleration will be enabled automatically if your computer and drivers supports it, so to check whether it’s working, open a new tab and type ‘about:support’ in the address bar. Scroll right down to the bottom, and there’ll be a section called ‘Graphics’. On the very last line, you’re looking for ‘GPU Acclerated Windows’ – if it says 1/1, then you’re all set. 0/1 means that you’re not using the hardware acceleration. Thanks to Joedrew for this information.

If it is disabled, the next thing to do is to try to enable it. On a Mac, you’ll need to be running Snow Leopard and ideally version 10.6.3, so upgrade to that if you can. On Windows, you’ll probably need to update your graphics drivers. Right now, only Intel, AMD (ATI) and nVidia graphics are supported, so if your graphics card is by someone else, you’re out of luck. But for those three, once you know what type of graphics card you have, head to the manufacturer’s web site and download the latest drivers. In most cases, your drivers will need to be quite new – ATI and nVidia issued updates in June 2010 which are required for hardware acceleration to be enabled.

How good is hardware acceleration? On my test machine, which runs Windows XP and has Intel integrated graphics, I tried Microsoft’s flying images demo in Firefox 4 beta 12 and Internet Explorer 8. Firefox managed a steady 60 frames per second with no problems, whilst IE8 struggled to make 6 frames per second. IE8 also needed 50% CPU usage for just 1 tab, whilst Firefox needed 45% with 9 other tabs open.

There’s some more information on the Mozilla Wiki, including the specific driver versions supported. If you haven’t updated your graphics drivers in a while, now may be a good time to do so, so that you can make full use of Firefox 4’s extra oomph when it’s finally released later this year.

Tumbleweed

Looks like I’ve been a bad blogger and not posted here for a while. Oops.

Here’s what I’ve been up to:

  • The slightly cryptic last sentence in my Blackpool post last month refers to the fact that my new girlfriend lives in Blackpool. Her name is Christine (that’s her actual first name, not a pseudonym), we’ve been seeing each other for about 6 weeks and I’ll probably say more about her as time goes on. It’s a distance relationship but we’ve managed to make time to see each other most weekends.
  • In October I went to see Ash when they played a gig at Bradford Gasworks. They were awesome. They’re also releasing a new single every 2 weeks over the next 12 months, the first 3 of which are out. You can buy all 26 for £11 which isn’t bad.
  • I’ve recently bought some noise-cancelling headphones, which actually do seem to work – my walk to work on a morning is now quite tranquil as I don’t have the noise of cars and the rain in the background, and can instead have my iPod at a lower volume. I only bought a relatively cheap Philips unit for £20 – the sound-cancelling unit is almost as big as my iPod nano – and bar some minor sound distortion they’re good for outdoor use.
  • I visited Halifax on Saturday – another local place that I’ve never really been to before. The Piece Hall is well-worth a visit for the small, independent shops. The rest of the town is nice but mostly full of typical high-street shops, so not worth spending much time visiting. And I’m a bit old for Eureka!, even if it is made of wall-to-wall awesomeness.
  • Firefox 3.6 Beta 3 is out. It’s noticably quicker than 3.5, although on my Mac it fails to start if Nightly Tester Tools is enabled. So right now I’m running with barely any extensions enabled.

Been away, going away…

I’ve been away from this blog for some time – 2 weeks almost – which is mostly due to being busy at work and having very little free time at home. I’ve been playing World of Warcraft a bit more than usual lately, but now have a second level 70 character as a result.

So what’s happened over the past 2 weeks? Well, based on my recent Twitters, here’s what I’ve been up to:

  • Been testing out Firefox 3 RC1 and Thunderbird 3 Alpha 1. Firefox 3 is looking really good now, especially on Macs where the improved performance and native theme make it even more of a joy to use. Thunderbird is obviously an early alpha build but it too is much faster, as it inherits many of the optimisations that were undertaken for Firefox. Unfortunately, it’s not yet very stable, but it is at least usable.
  • Now that I have more than a smidgen of free space on my MacBook, I installed Ubuntu Hardy Heron in Parallels. Unfortunately, despite updating to the latest Parallels release, the Parallels Tools for Linux package doesn’t work with this release of Ubuntu so there’s no adaptive window sizes, cursor integration and clock synchronising. It’s a shame as apparently VMWare Fusion does support the latest Ubuntu release. I haven’t played around with Ubuntu much but it looks good, and including Firefox 3 is a bold but welcome move.
  • Speaking of Twitter, I would recommend the TwitterFox extension if you use Twitter and Firefox, as it’s quite a handy little extension which lets you read and interact with your Twitter friends. It doesn’t have masses of features, but it’s intuitive and it works with Firefox 3 already.
  • Google Reader’s ‘Trends’ feature has an unexpected use as a way of digging out feeds which haven’t updated in a long time. I found one that had gone dead in October 2005 that I was still subscribing to. I also found a few sites which had changed their feed URLs without redirects so I wasn’t receiving updates any more.

This, unfortunately, isn’t the return to regularly scheduled blogging, as on Saturday I’m going away for five nights in camping barn in the Lake District with some friends. It’s really in the back-end of nowhere – it doesn’t even have a connection to the electricity grid so all power comes from a hydro-electric generator, and it’s highly unlikely that there will be any mobile phone reception there either. So until I return on Thursday, you may not hear a peep from me, either on here or on Twitter.

Firefox, Performance, and You

I’ve been blogging quite a bit about the beta versions of Firefox 3, which can be downloaded here, and how much better it is than Firefox 2. If anything, I’m as excited about this version as I was when version 1 came out, as it feels like the browser I have been using for 5 years has now grown up and many of the issues it has had in the past have been ironed out.

In this entry, I am going to go through the various changes that have been made in Firefox which improve the performance of the browser – the startup times, the time it takes to render web pages, and the general responsiveness of the program. Improving performance has been a major focus of the Firefox developers for this release, and the changes are notable.

Memory usage

Do a search for ‘firefox bloated‘ and you’ll get over 500 000 results, many of which complaining that Firefox is big and slow. Many put this down to the amount of memory it uses, which, in Firefox 2, appears to be more than its main competitors – Opera, Internet Explorer and Safari. (Note that, unless you’re using Windows Vista, it is difficult to measure memory usage of individual programs on Windows successfully)

For Firefox 3, reduces Firefox’s ‘memory footprint’ (the amount of memory it needs to run) was one of the main priorities. Improvements have been made both in reducing ‘memory leaks‘ – memory taken by Firefox that isn’t released back to the operating system when it is no longer needed – and memory fragmentation, which means that the memory it does have allocated is used more efficiently. The culmination of this is that, on Windows, Firefox 3 uses less memory while running than any other current web browser. It also released more memory back to the operating system after a period of inactivity, meaning that it’s no longer needed to close and restart the browser because it’s eaten half of your RAM.

How does this improve performance? If you have 16 GB of RAM, then, not much really. But if like most computers your machine has just enough RAM to perform, then it means more of Firefox can fit into RAM and less of it has to use ‘virtual memory’ – essentially a big file on your hard disk which acts as an overflow when all of your RAM is used up, but that is much slower than RAM. It will also allow more space for other programs in RAM, so you’ll be able to run more programs at the same time as your web browser.

Code optimisation

Several parts of Firefox have been re-written to fix bugs and simplify code, and in some cases, improve performance. There have been performance improvements in:

  • Page rendering – a marked performance increase that also means that Firefox 3 will pass the Acid2 test
  • Image drawing – a bug fix sorted out problems with image caching and a new JPEG decoding routine also means that images will render faster

Mac-specific improvements

Firefox 3 finally moves away from the really old QuickDraw API to the newer Cocoa API. As well as giving nicer widgets (scrollbars, buttons etc) on web pages, this also means the whole program should feel more snappy. This, combined with the new theme, means that Firefox 3 is the most Mac-friendly version to date.

Profile guided optimisation

Firefox is now, essentially, compiled twice – the first compile runs as usual, and then the compiler runs a series of tests which optimises the code by looking at what parts of the browser will be most used in a working environment. This has lead to performance improvements of at least 10%.

Because we’re now approaching the ‘release candidate’ stage, ahead of a final release probably some time in June, most of the performance changes have now been made, so if you want to see if it is an improvement for you, now is as good a time as any to try; any further changes will be to fix any major bugs and stability issues. All in all, the massive strides made in performance make Firefox a much bigger competitor in the web browser arena and may win back some of its earlier detractors.

1000 reasons why IE is better than Firefox

It’s in French, but here’s 1000 reasons why IE is better than Firefox. Except that there’s only actually 14 reasons, so it’s 986 short. And some aren’t really reasons. In fact, it’s a pretty pointless piece of flame-bait designed to stir up the Firefox community.

In any case, here are those reasons translated into English, with the help of the Google Translator and my French A-level (feel free to correct me if I get any of these wrong):

  1. Internet Explorer is integrated with Windows XP so you can surf the internet without having to decide which browser to use.
  2. Internet Explorer is accessible for everyone.
  3. IE can display all web pages – not all of them work in Firefox.
  4. IE requires hardly any extensions, whereas Firefox has a plethora.
  5. IE does not ship with tabs, but they can be added if you wish.
  6. IE does not have an RSS reader, which is a fad. You can just visit the site every day if you need to.
  7. IE is less secure than Firefox, but patches are released regularly.
  8. IE is closely linked to Windows.
  9. IE does not pass the Acid2 test like Safari does.
  10. You need to use IE to access Windows Update – even though Microsoft released a Firefox plugin for Windows Genuine Advantage, they will never open Windows Update to Firefox.
  11. IE doesn’t crash when visiting online banking sites, Firefox does.
  12. IE7 will adopt the standards of 2006 and include innovations of Microsoft and others, such as RSS, SSL3 and better security.
  13. IE does not respect W3C standards in their entirety.
  14. IE is the ‘de-facto’ standard that developers work to.

There you go. Pretty lame reasons, in my opinion, and some of them are reasons not to use IE as far as I’m concerned.

[Via Glazblog]