Firefox 3.6 Performance: Startup and Snappiness Improvements
Posted: January 21, 2010 Filed under: firefox, mozilla | Tags: firefox, Firefox3.6, Mac, Performance, startup 17 Comments »Firefox 3.6 was released today! For me, the most important changes in this release are the performance and stability improvements. On Mac especially, there are some big improvements in startup time, yielding up to 30% faster startup generally. And on both Mac and Windows, we fixed some pathologically bad startup scenarios.
The list of bugs fixed that specifically affect startup time is here, however a few should be called out individually:
- Ted Mielczarek and Drew Willcoxon combined all .xpt files into a single one, reducing the number of files read from the disk at startup.
- Rob Strong removed the need for services to load at startup for timer registration, reducing the number of files read from disk at startup, as well as reducing the amount of JavaScript executed. There are still services that need to be ported to this new scheme, so expect more improvements here.
- Vlad Vukicevic found that on Mac it could take up to a whole second to initialize Growl, if present. His fix initializes Growl on demand.
- Joel Reymont found that up to 10% of startup time on Mac was in the initialization of fonts. John Daggett and Jonathan Kew did some great work to reduce the problem in Firefox 3.6. They subsequently modified font loading on Mac to occur on-demand, so the next release will be even faster.
- Joel also found that up to 12% of startup on Mac was spent in some APIs that were only needed for debugging. The problem was quickly fixed by Masayuki Nakano.
- Taras Glek and Alfred Kayser spent a bunch of time improving the performance of how JARs are loaded and read from. The infrastructure improvements made are paying off as we move more groups of small files into these archives, reducing the number of individual file operations that occur at startup time.
- On Windows, it was found that a large portion of startup time was spent in the security libraries, building up entropy by trawling through IE’s cache folder and the Windows temp directory. Some Windows users reported upwards of 25k files in their temp directories, so you can imagine the delays that this behavior was causing for some users. The behavior is now fixed.
The full list of bugs fixed in Firefox 3.6 with the “perf” keyword is here. These range from improvements to web page loading times, general UI responsiveness, and improvements to specific UI actions such as searching History and Bookmarks:
- One of the biggest improvements is that Shawn Wilsher ported all of the Awesomebar code to JavaScript and moved the queries that build up the results to a background thread. This resulted in a massive improvement in UI responsiveness when typing in the location bar.
- Another infrastructural improvement that will affect general responsiveness is Marco Bonardo‘s work to clean up the bookmarks and history database periodically.
- Per-tab-network-prioritization is the long way of saying that Firefox will prioritize the network traffic of pages you are currently interacting with. Paul O’Shannessy explains the feature here, and was able to finish it up in time to make 3.6.
- Finally, there are a TON of performance improvements to the JavaScript engine, which benefit just about every area of the browser, from startup time to page loading to extensions. Dave Mandelin put up a detailed post on Hacks.Mozilla.org last week that explains it all.
And all of this is just a taste of what’s to come: Over 60% of the bugs fixed as part of our focus on startup performance have landed on trunk, but didn’t make it in time for the 3.6 release. You can follow along on the wiki page for the startup project, and here on my blog, where I post status updates every Friday.
Streaming Your iSight Camera to the Web with the Video Tag
Posted: May 31, 2009 Filed under: firefox, mozilla | Tags: firefox, icecast, isight, Mac, mozilla, ogg, openvideo, theora, vlc 11 Comments »I wanted to do a demonstration of live streaming using the <video/> tag for my talk at the upcoming Open Source Bridge conference; maybe a stream a surprise guest in, do some audience interaction, something fun. I figured the easiest way to test the streaming myself would be to use the webcam in my MacBook Pro’s built-in iSight camera.
I pinged Asa to get details about how he streams Air Mozilla, which brought Icecast into the picture. I found some old posts about using VLC on Linux to capture the external iSight, so tried it… but no dice, the capture module barfed when trying to talk to the camera. VLC ships with a capture module for the iSight, but hasn’t been updated to work with the internal iSight. Bah. VLC also supported transcoding to Ogg Theora, as well as streaming to Icecast servers, so it really seemed like it’d provide just about everything, if it only supported the camera.
I looked up the error I got from VLC, posted on the VLC forums, no answers. So I emailed the author of VLC’s Quicktime module, Pierre d’Herbemont, at the email he left in the source file. After a couple of emails, and less than 24 hours later, he’d checked in a fix. Open source FTW. Thanks Pierre.
The steps to get it working are enumerated below. At some point, the VLC fix will ship, but until then you’ll need to use nightly builds.
Install and configure the Icecast2 server:
- Install MacPorts
- In the Terminal: sudo port install icecast2. This installs everything into various dirs in /opt/local.
- Edit /opt/local/etc/icecast.xml, set user/group it runs as (for logfiles, i set mine to _www, same as Apache), and change the default passwords in the authentication section.
- Set permissions on /opt/local/var/log/icecast to be writable by the user you configured Icecast to run as.
- In the Terminal, start the server: sudo icecast -c /opt/local/etc/icecast.xml -b
- Test your install by checking the server’s status at http://localhost:8000/status.xsl
- Watch the log in the Terminal: tail -f opt/local/var/log/icecast/error.log (Useful for confirming VLC access, as well as catching authentication problems)
Start the stream:
- Download and install the most recent VLC nightly build
- Open the terminal, and execute the command below
- Open http://localhost:8000/stream/isight with Firefox 3.5b4 (or newer)
VLC Command (all one line):
/Applications/VLC.app/Contents/MacOS/VLC qtcapture:// –sout=”#transcode{vcodec=theora,vb=256,venc=theora,acodec=vorbis,ab=64,aenc=vorbis}: standard{access=shout,mux=ogg,dst=source:yourpassword@localhost:8000/stream/isight}”

It’s still not quite ready for practical use:
- There’s still some size distortion, maybe I have the aspect ratio wrong or something
- Still working on sound
- Lag is pretty bad
Live Screencasting on a Mac with Mogulus and CamTwist
Posted: June 20, 2008 Filed under: Mac, OSX | Tags: Mac, OSX, screencasting 1 Comment »This is bare-bones for now, just basic instructions to point folks at.
- Download and install CamTwist
- Go to Mogulus.com create an account and a new channel
- Start CamTwist
- Select “Desktop” from the video sources list on the far left
- Select “Full Screen” from the settings pane on the far right
- Restart your browser (yes, do it)
- Log in to your channel’s studio on Mogulus.com
- On the left, in the Sources section, under the Cameras tab, your camera should show up
- In your camera settings, select “CamTwist” as the Video Source, and click the Cue button
- On the right, in the “Cued clip” section, press the big “Transition to cued clip” button
Boom, you’re now screencasting live.
Installing the Lexmark P4350 on Mac OS X Leopard
Posted: June 1, 2008 Filed under: Mac, OSX | Tags: Apple, Leopard, Lexmark, Mac, OS X, P4350, printers Leave a comment »- Uninstall the printer, if already installed from a previous version of OS X, or from previous attempts to install Lexmark’s drivers
- Open Finder, click on your HD, find Library/Printers/Lexmark, and rename it to Lexmark.bak
- Reboot
- Insert your Leopard DVD, double-click Optional Installs, double-click Optional Installs.mpkg
- When Optional Installs has loaded, open Printer Drivers, and check the box next to Lexmark, then finish the installation process.
- Open System Preferences, and then Printer and Fax
- Click the + sign to add a new printer
- Your P4350 should show up as “4300 Series Printer” in the list. Select it.
- The dialog may spin for a few minutes. When done, it will enable the driver selection list. Select “4300 Series” from the list and click OK.
You should now be able to print. I did this on two different Macs, and it worked for both.