Saturday, September 27, 2008

Javascript speed, the browser wars, and the death of IE6

Over the past year the FireFox, WebKit, and now Chrome teams have been going back and forth with faster and faster Javascript engines. Shortly after each update a number of blogs run all the engines through the benchmarks. When Internet Explorer is included it is always in last place. Not just by a little bit but by a significant amount. It is so slow that it is often just left out of the graph altogether. The IE team is working on it and the latest beta of IE 8 is three times faster then IE7, but it is still three times slower1 than Firefox 3.0.1. And sense that article FireFox and everyone else have gotten even faster engines, not just by a little, but by a significant amount. This isn't about IE8 or IE7, but about IE6 and its market share. IE6 currently has around 35% market share which is a huge number of users to fight for. All of the Javascript wars is about making those AJAX and heavy Javascript applications run faster. With developers using fast computers with Firefox one can see what is going to happen when someone on a 800Mhz computer and IE6 tries to load the site. Already I have heard of developers migrating users off IE to FireFox because it would take the user several minutes to just load their Javascript heavy site. In the next year as developers take advantage of the new speed this huge swath of users will find themselves feeling more and more pain. Developers might try speeding up a thing or two, but the speed difference between the engines will only allow a developer to do so much and many developers will simply ignore the problem. Sure users can still *use* the site if they are willing to wait, but eventually they will hear about how their friend doesn't have the same problem with FireFox/Safari/Chrome/Arora and upgrade. While tabs and add ons have caused a downswing in IE's marketshare it might be javascript performance that will be the tipping point for the end of IE6. When FireFox got tabs you could still browse the web with IE6, but when FireFox gets a much faster Javascript engine you might not be able to browse the web with IE6.
1

Monday, September 15, 2008

Adobe owns the web and they don't even know it.

The last ten months I have been hacking on a little cross platform WebKit based browser call Arora. Users try it out and are mostly happy, but near all of them end up asking me the same thing:
How do I get flash to work?
Arora uses the Qt and the current version (4.4) does not ship with support for netscape plugins. After the release of Qt 4.4 this feature was added to QtWebKit and will be part of Qt 4.5 this winter. To get it today all you have to do is compile Arora against WebKit trunk. Every few days someone pops into the Arora irc channel asking how they get get plugins. They say "plugins", but they really mean flash, and by flash they really mean video. Every day users are willing to download a development version of WebKit, built it and then build Arora just so they can get their YouTube fix. Users! These are the people who are not willing to do anything are willing to go through all that pain on their own. Big red alarms should be going off at the w3c that a binary plugin is required for browsing these days. Arora has pretty clear documentation on how to get plugins working so I can only imagine how many users went through the hassle and didn't have to ask for a pointer to the instructions. There was even a developer who after putting Arora on an arm device asked how to get Flash working. After discovering that he could not just copy the flash libraries to his device I got the distinct impression that no matter how good Arora was if he couldn't get flash it wouldn't be good enough. The majority of flash on the web for me seems to be 1) videos 2) ads 3) movie websites. I even had a user tell me that Arora was fantastic and would use it every day, but only once Qt snapshot had flash. In the last three years flash has gone from just another plugin to the only plugin on the web browser that matters. I myself never installed flash in Linux until two years ago. This is of course all because of video and specifically YouTube.

But here is where I am puzzled. Adobe is acting like they deserve to be the standard rather then what they should be which is scrambling to make sure they keep their foothold in the browser. Today flash is installed on nearly every browser, but "almost all" should not be good enough. They should have binaries for every platform under the sun, a QA team like no other, and paid developers on every open source browser to make sure the integration is perfect. Adobe should make sure that there is no geek out there who is fed up with flash and willing to dedicate their time to hacking on video on HTML 5.

Flash as a product is pretty bad. It frequently causes the browser to crash and Konqueror (and now Chrome) even ran flash in its own process so that when it crashed it wouldn't take down your whole browser. Flash ads frequently cause your CPU to spike and cause your page loading to freeze. As a user experience they are pretty bad to boot and until recently Google couldn't even index them. Adobe regularly make releases that break browsers and only release binaries for a insanely small set of platforms. Want to run 64bit Linux, or any BSD? No flash for you.

So what might the future hold? It was pretty clear from the Chrome presentation and literature that Google dislikes flash's presence in their browser. It cuts through their security model and in general doesn't play well with what the goals of their project are. But just like me probably found that their initial user base didn't care about their design goals, but just want to see videos of ninja cats. Video through HTML5 is real and coming. It will be in FireFox and WebKit browsers very soon. Up until now I hadn't thought much about this because of the YouTube problem. Even if I.E. supported HTML5 video why would YouTube go through the hassle of upgrading? With Google's Chrome there is finally a very compelling reason for Google to apply internal pressure to get support for HTML5 Video in YouTube. Once YouTube can stream those videos then Chrome could ship with plugins off by default (or disabled until your click on it in some fancy javascript way) creating a more stable, faster, and secure browsing experience. And what about those flash ads? Google uses text ads so they would be hurting competitors to boot. Once YouTube switches the other video sites will follow suit and copy this feature crushing flash's primary reason for existing. Of course only time will tell what really happens with YouTube.

Adobe has bet big on Flash and I mean huge. Six years ago they were a desktop company producing desktop software. But the past few years they have changed. They bought Macromedia and along with flash got their board of directors. For them flash, flex and the web is the future. They want to be the Microsoft of the web. They are directly completing with every cross platform toolkit out there in an attempt to create the new way that desktop and web software is created. They are riding the wave of flash installed and enabled on your browser and if that starts to change they will not be happy. If the golden goose (video) stops laying eggs before some killer flex apps are released there will be problems. Who knows how unhappy they were when the iPhone was released without flash and a dedicated YouTube application sat on the main screen. Perhaps they wanted too much money? There is a video on YouTube a short while back where on of the Adobe sales guys was giving a presentation at Google about flex. There was around ten people in the audience and near the end of the presentation he started saying
Just between you and me Adobe plans to ... platform .. web .. embedded .. flex
My jaw hit the floor when he did that and he was no doubt reprimanded if not fired when he returned to Adobe for the plans he spilled*.

No doubt Adobe will try to flight, maybe create their own YouTube clone, maybe fight with patents to keep HTML5 video off the web. Already they have announced that they will be removing the license fees on the next major releases of Adobe Flash Player for devices. You can read it for yourself in the Adobe quarterly report where they expect to get more money from "an increased demand for tooling products, server technologies, hosted services and applications". Now what happens if people disable flash, developers don't use it, and device manufacturers no longer want it? If YouTube even hints at HTML5 video I would short their stock.

*This has happened several times on Google tech talks that I have seen, it is amazing what people will say when they think they are only speaking to ten people and not the web.

Thursday, September 11, 2008

Usable Linux on the laptop?

Four years ago I picked up a used G4 apple laptop as a second machine. I kept OS X on it and happily used it. The reason I picked up an Apple was that for years I had tried to use Linux on a laptop, but never been able to very well. When I got the apple I discovered some 'amazing' properties that it had. At any point in time I could close the lid and it would go to sleep. If the battery got to low it would suspend to disk. Open up the lid and it would wake up and in just moments you are back working. Not only that but it would automatically find wifi and connect to it even if you were not in the same location. So what if the thread performance of the OS X kernel wasn't that fantastic, it worked really well with the hardware to give me the user a fantastic experience and I still got all my unix tools. Two years ago I picked up a macbook and to add to the fun I can stretch it to five hours on battery if I want to. Every once in a while someone would ask me why I don't run Linux and after telling them the above they try to convince me that it is much better now. I shrug my shoulders and say I am happy so I see no compelling reason to switch to Linux on my laptop (my desktop is Linux).

At my new job I got a laptop and was excited to find out it was getting a Lenovo, one of the laptops that had support for Linux, formally part of IBM and a good rugged laptop to boot. Putting the latest Ubuntu on there I figured was the perfect combination. Ubuntu had been talking about putting themselves on laptops so I assumed that it would all work. After having it for a week here is my notes:

100 Minutes - Not sure if this is Lenovo's fault or Linux, but I get 100 minutes off the battery with light usage. Compiling webkit or something big and continuous and the battery is shot. You plugin your laptop when it has 20% left and usually it starts out at 80% just from being carried to work or being in my bag. So if I am real lucky I get less then fifty minutes before it starts warning me to plug in laptop. You could say this is really a portable workstations, but my macbook also has dual core and 2GB ram and it gets much better. I am leaning to blame Linux because I couldn't believe a laptop manufacture would actually release a non-gamer laptop with only 1 1/2 hour battery life.

Maybe I have become spoiled, but when I close the lid I expect the laptop to go to sleep. Closing the lid on the Lenovo doesn't do anything other then turn off the screen. The first day I put it in my backpack only to find my backpack getting *very* hot by the time I to MIT and to top it off the computer running out of power before the next day loosing my state. With the screen off and the graphics hardware asleep I can't imagine what is causing the heat buildup with the desktop idle.

Suspend or hibernate. Ask anyone on the street to tell you the difference and they will tell you to go away because they don't know. Laptops shouldn't bother asking you. By default they should sleep and suspend only when the battery is near gone.

In the event that the laptop sleeps for a very long time I would expect that the shiny Lenovo would suspend to disk when the battery is very low to prevent me from loosing my state, but nope Linux is happy to loose it.

When I do get it to suspend I would expect that the resume would be snappy. The first few times I assumed it wasn't working and hard rebooted. Turns out it takes nearly ten seconds to resume under Linux. Resume from sleep on OS X is near instant, maybe half a second.

On the plus side wifi in Linux now works...

Popular Posts