Thursday, July 7, 2011

Sweet 6 point oh een (or something)

The reason it's been quiet here lately is, of course, that I was working on porting Firefox 6.0, which hit the beta channel on Tuesday, and there it is. In fact, this post was written up in it.

6.0 is the first full iteration of Mozilla's rapid release strategy (i.e., a full 6 weeks at each stage), and yet, if Firefox 5 should really have been Firefox 4.1, this still feels like 4.2. Out of the box, the only major user facing feature is "highlighting" domain names in the URL bar (really, dimming the rest of the URL). This is another Chromism and I'm not really very fond of it personally. Mozilla is also introducing, as a trial balloon, a Permissions Manager accessible under about:permissions. However, if you're like me and have a lot of specific cookie permissions, it takes forever to load and is not significantly better than the old way with preferences; it's also not exposed in the UI anywhere.

Under the hood there are additional HTML5 elements now supported, most notably <progress>; WebSockets (which were pulled for security reasons in Fx4); enhanced developer tools, and MatchMedia support. And, well, that's about it.

The build is not going entirely smoothly. Tobias Netzel has shipped me a 64-bit version of the ported Xcode linker we use while I try to get a debug build mounted, but optimized builds do function, obviously. However, the debug build is exhausting the memory on the 8GB G5 buildhost, so this appears to be a 32-bit limitation. We may have to add a build requirement that the debug build be built with the 64-bit version of the linker, which would limit the machines that can build it, unfortunately. More on that as we sort this problem out.

Specific to us, I'm phoning this release in because Mozilla landed a lot of crap that tripped up porting our changesets. Among the new changes was splitting off some of the text handling features in the Cocoa widget code (bug 519972), which naturally upset the Tiger customizations I had made. I believe I've successfully dragged back all the 10.4-specific code that we need into the new places, but I'm still not convinced everything is correct. This took several days to rewrite, and we will have another set of rewrites to do in Firefox 8 related to it. On top of that, Mac OS X 10.7, which went golden master and is expected to emerge "any day now," has serious bugs in its implementation of ATSUI (bug 663688, currently sec-locked), which we must use in 10.4 because 10.4's secret Core Text support is incomplete. Mozilla thus rewrote much of the legacy font handling code we rely on in terms of Core Text, which blew up the compile on 10.4. I've hacked this back into submission, but it will break again because that whole section will be revised when 10.5 support is dropped from Firefox and I am unfortunately all but certain that will occur somewhere around Firefox 9, early next year. After all that work, and trying to move to a new house, I really haven't had time to work on more TenFourFox optimizations for this release. We should get a break in Firefox 7 (if we're still able to build it, of course), so if we get Fx7 to stand up as 10.4Fx 7, then I'm going to work on some more AltiVec improvements at that time.

That brings us to plugins. Mozilla has made the first change which will break some legacy plugins in bug 468678, which was a long-warned threat to disable resource files as a data exchange method in Mac plugins. Cursorily Flash and QuickTime don't seem affected in their recent versions, but people using old versions might not be so lucky, and other plugins depending on this will break. This is the first change of many that will erode plugin operation, so as threatened, this version turns plugins by default off and support for plugins ends. I have wired up a preference to reenable them which will be posted here, as I assume if you follow this blog that you are technically versed enough to understand they are no longer supported, may not work correctly, may not work at all in the future, and already have known bugs. More about that when I get 6 beta 1 polished for release, hopefully next week.

On the 5 front, Mozilla is ruminating about a 5.0.1 release to address the 10.7 issue I explained above. This is not decided yet, but my insiders tell me it's probably going to happen and would be a Mac-only release fixing that bug only. This does not affect us right now, but because it has the font changes in it, it requires us to backport our fixes for 6 to 5 which could be iffy if we need to build more versions from 5 (such as we find some showstopper in TenFourFox 6 that requires an interim 5.x security release to be made). This will also snarl our home builders, so we may need to issue a workaround for you folks as well. We'll deal with this if action is required. As a point of completeness, 4.0.3 remains the terminal release for TenFourFox 4.

Speaking of 5, David Fang, our indefatigable Fink porter, reports that TenFourFox 5 now builds on 10.5 and 10.4 from the Fink unstable tree, and he and his crew are getting 10.5 support backported to TenFourFox 4. So those of you who want to continue making custom builds, but are allergic to MacPorts, continue to have that option. Strong work!

Finally, Chris Trusch's legwork on the Java and TenFourFox 5 issue has culminated in Apple essentially admitting that they broke Java on 10.5 on purpose in bug 668639 (except, of course, for Safari). The solution is, natch, to upgrade to Snow Leopard, and Apple says that the problem is a "non-issue for PPC users, because Firefox 5 and Chrome only run on Intel Macs." Don't we just love those guys? If we end up releasing a 5.0.1, we will have a workaround in it, or you can use the symlink fix detailed in the thread. The code for it will be in 6, but Java will also become unsupported, as I expect Update 10 to be the final Java update for PowerPC.

Watch for builds next week, hopefully. There will be a period of brief downtime on Floodgap while I physically move the hardware to a new network and new data center, but the Google Code page and this blog will obviously remain in operation. I don't expect the network downtime to be more than 12-24 hours.


  1. I am consistenly impressed by your super human abilities - thanks again for doing this.

    I actually nearly folded and toyed with going back to Safari 5 as TenFourFox was launching really slowly (well slow enough to annoy me) until I looked and realised it was loading all kinds of bizzare plugins I'd picked up over the years. Now I've disabled all plugins and trimmed my use of extensions right down it's much, much better. So I'm fine with plugins going away as I have very little need for them.

    Which brings me to this point: Do you (any any other TenFourFox users) have any performance tips beyond what is detailed in these two posts:

    A Tour Through TenFourFox's about:config

    5 Tips To Reduce Firefox Memory and Cache Usage

  2. Yes, it's quite possible to accumulate a lot of cruft in one's profile. When I was using Camino, I started fresh over at least once because of all the junk. In Firefox, I kept myself down to three or four plugins and a couple add-ons, and that helps.

    Short of the references you cited, though, which are good ones, there aren't many other knobs yet that you can twiddle to control memory usage. Mozilla is working on a few, however -- see and

    Cursorily, Fx6 seems to use a hair more CPU than Fx5 did. I'm not sure why right now.

  3. And as far as general performance goes, we're pretty much maxed to the hilt short of more PPC-specific code conversion, which is priority #2 after obviously the actual port itself.

  4. Ok, thanks, just wondered if I was missing anything else I should have known about. I'm pretty happy with performance now (it was mainly startup time was the issue for me) - can't really expect too much from a 1GHz G4 with only 1.25GB of RAM and three permanently logged in accounts (two of them probably with flash running in Safari).

    Memory-wise, I notice the issue on Windows far more than on OSX. I probably can't get through a day of using Firefox without having to restart because it's using 1GB+ of RAM (but I do have more add-ons installed on Windows).

  5. I just found TenFourFox by sheer chance when I had just installled Ubuntu 10.10 (and 10.5) on my trusty old Quad G5 with my beloved 10.4.11, and i was checking if somebody actually ported Chromium over to PPC. Someone was asking about this on some forum and someone else recommended TenFourFox - and man, was I suprised! ;-) You guys really, really rock! I nodded with every stab at Apple, Mozilla and Intel on your homepage, being a huge PPC/Altivec-advocate myself! ;-)
    Keep up the great work and thank you so much! Is there any chance you may some day work your Altivec magic on other projects, e.g. x264's or ffmpeg's (last i heard!) rather ancient and not 100% efficient Altivec implementations? ;-) Someone told me the vector alignment isn't very efficient...
    Seeing how you ported FF's Javascript engine to PPC, how hard would it be to replace V8 in Chromoium with that, to make it compile on PPC, too? And how hard would a port of TenFourFox to Ubuntu PPC be?

  6. Thank you for your work :) It runs fine on 10.4.11 Tiger PPC, 10.5.8 Leopard PPC, and 10.6.8 SnowLeopard Rosetta :)

    We have released TenFourSTK 0.7.2 (SuperTuxKart 0.7.2 for PowerPC Macs):

    You need Mac OS X 10.3.9 Panther or higher.

  7. Strong work as always, Christian!

    DeeKay, regrettably it's a lot of work just working on *this* :P if I get some free cycles I might look at other stuff, but I do best on projects that scratch my itches and having a working browser on my G5 is definitely an itchy itch to scratch. Perhaps other users with PPC coding experience might be able to step up for those projects.

    In answer to your question about PPC V8, considerably more work. We were lucky in that Adobe already had a PPC backend for Mozilla TraceMonkey (a holdover from Tamarin); it just needed to be finished up and polished for Firefox. And trace compilation using a documented IL is easier to write a backend for than a complete method-based compiler (which is what JaegerMonkey and V8 are). There is virtually no overlap between the PPC nanojit and V8; someone was working on a PowerPC V8 and it seems to have run aground some months ago.

    At some point we will start working on methodjit if IonMonkey is not imminent and that may well help a V8 port, but that's not something I intend to do myself for a variety of reasons.

    TenFourFox is extremely Mac OS-centric, largely because I use 10.4 for Classic. Some of the code, such as the nanojit itself and the AltiVec WebM, pixman and YCbCr->RGB stuff, could be ported to Linux, but the nanojit requires Linux glue (which has not been written) and the build system has been hacked for 10.4 which may need to be undone for Linux. While I would be happy to point people to such a build, were Someone(tm) to work on it, I do not use Ubuntu and would not be able to maintain it personally.

    But I thank you for the kind word :)

  8. A side-question in regards to SuperTuxKart, the program is already a universal Intel/PPC binary, so why did you need to compile a special version?

    Also, 0.7.2 is still a release candidate, not final yet.

    Sorry, Cameron, I just couldn't figure out the reason that was mentioned here.

  9. There are a lot of failures in 0.7.2 RC2 on PowerPC Macs:

    - Add-ons aren't downloadable
    - Slowly speed by Irrlicht 1.8 Alpha
    - Graphic failure on Tiger
    - DMG background isn't displayed
    - No Panther support :(


    - Add-ons are included
    - Faster by Irrlicht 1.7.2
    - No graphic failure on Tiger
    - It runs on Panther :)
    - DMG background is displayed

  10. Just wanted to write a quick thank you for this effort. I use a 12" PB for a lot of work and play, and this latest build of TenFourFox 5 is a massive improvement in browsing speed. Facebook is smooth and YouTube can play 360p videos without any hesitation in the normal window size. Big kudos for making my favorite machine even more usable.

  11. I would also like to say that this project is saving us a lot of money because it extends the useful lifetime of our older Macs. I don't need an eight core Intel-Mac Pro for what I do for a living (mostly typing), but without a fast and capable web browser, any computer is pretty much dead. Most browsers are Intel only nowadays. Safari 5 for PPC-Leopard does have a fast rendering engine (and some very nice extensions), but everyone who played with it should have noticed that its GUI is dog slow, and its disk activity is maddening (that's true on Intel Macs also, I don't know what Apple is doing with its formerly lean and fast wunderkind browser), but anyway: Firefox/Tenfourfox is what keeps the G3 and G4 Macs in my household alive. Thank you.

  12. I dunno if you guys are going to say that after plugins are disabled :P but as I say above, you'll have the option in about:config still; it just won't be supported anymore.

    Having used 10.4Fx 6 for a few days now, it is definitely better with memory, but the additional garbage collection makes it a little more busy than 5 and it does use a small but noticeable additional amount of CPU. I did get some AltiVec tweaks done and this compensates a little, but it's ever so slightly slower. We'll see what 7 brings, if it still builds.

    The G5 is cranking out beta 1 and I hope to have it available no later than tomorrow.

  13. I know that they were rejected for official FF6 (i.e. pushed off to FF7), but given that old Macs are generally much lower RAM machines: would it be possible to get the patches for BZ#656120 and BZ#666058 included in TenFourFox 6?

  14. bks, I fully agree with your assessment and I'm still going to say no. :) While 666058 does not look like an *un*safe patch, 656120 really scares me. GC is not a costless process; it does require CPU time, and while our Macs are often more memory impaired than PCs (although, in fairness, none of my daily driver Macs have less than 1.5GB of RAM) they are certainly more CPU impaired than they are RAM impaired. Anything that increases GC frequency without ample payoff risks hurting performance for no good reason, especially on G3 and 7400, because the browser must do additional work it would be ordinarily spending on something else. I agree wholeheartedly with the release drivers' comments in that bug that this needs more baking before it should be lifted up into a release branch, even considering it's supposed to "only" activate when idle.

    Speaking of, the automated internal conformance testing showed a big failure in JavaScript, so I had to scuttle tonight's planned release. I think I have the problem solved, but I want to redo all the tests before releasing the beta. Hopefully tomorrow or Thursday.

  15. Well, if the upgrade isn't feasible, I won't do it. If the Pismo (slow G3, but lots of memory) is better of with TFF 5, there it will stay*. I'm pretty confident, though, that the G4 PowerBook 1.3 GHz will run TFF 6 just fine.

    Regarding plugins, I'll just have to wait and see. I'm not ready yet to sacrifice plugins for better html/css support, because the web isn't ready either. It would be nice to live in a world without flash crashing my browser, or in a world where nobody uses flash anymore, or it was never invented in the first place, but we're not there yet. Right now, I need both, web standards, and plugins.

    *As will many other machines, because their owners simply refuse to upgrade to yet another version of Firefox. I bet many companies will stay with FF 3.6 or 4 for months because the admins have better things to do than to test new versions 24 hours a day.

  16. Please include FlashBlock (a click-to-play) in your releases so that people don't get hosed using old Flash versions. Perhaps eventually add a menu option with a warning that informs people how easy it is for their systems to get hacked by running an old version of Flash.

    Another question- would the Gnash open source flash video player be able to be integrated into your TenFourFox releases?


Due to an increased frequency of spam, comments are now subject to moderation.