June 13, 2007

Steve Wasn’t Kidding. Safari IS Fast.

I finally get why Apple chose Safari for the iPhone. It’s because Safari does content rendering amazingly fast: especially AJAX. This should have been more evident when the iPhone was first revealed and a customized Google Maps application showed the little red pin dropping on the map a smooth animated way. I’ve included the video below.

Watch the animations carefully and remind yourself that Google Maps is running inside a browser on a phone:

At work, I am writing an application that does some AJAX event handling. The scripts I use fire up as soon as the page finishes loading, and takes linearly more time to initialize as the page size increases.

  • In IE, the page will freeze up for about 1 second while the JavaScript fires up.
  • In Firefox, this same freeze time is about 1/2 a second. 
  • In Safari, I can’t notice the load up time. And I’m really paying attention.

On the iPhone, this will be a Godsend. I say that because sometimes I load up a website on my Blackberry, and occasionally things freeze up for 10 seconds while it tells me “running JavaScript…” (stupid CNN.com)

The very first time I launched Safari, it was slow as pudding — probably doing updates or something behind the scenes. But after the third or fourth start up, it was amazingly fast. I mean really fast. Firefox and IE both take a few sounds to launch. Safari is probably twice as fast (as advertised!). I don’t know how they do it, especially since the entire application has a visual skin, but they did it.

Another interesting aspect of the Safari browser is memory usage. Many people have probably noticed it is a beast when it is being actively used. And it is. But it is actually very smart in how it manages your memory. Observe:

  1. I have a blank window of Safari open and it is using 22 megs of memory.
  2. I visit Google.com and it goes up to 29 megs.
  3. I open a tab and visit Digg.com. It is now up to 43 megs.
  4. I minimize it. It is now using 1.2 megs.

Now that was unexpected. Clearly Safari only uses memory it knows is freely available, and then releases it back as soon as it recognizes it is no longer needed. In a limited environment such as the iPhone, I can see why this sort of streamlined memory management is ideal.

So despite there being a few hiccups in the (still Beta) browser, I am, overall, very impressed with its quality.

Filed under: Geeky Stuff — Michi @ 10:50 am

Share this

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • Reddit
  • StumbleUpon
  • del.icio.us
  • description
  • Technorati
  • Slashdot
  • co.mments
  • NewsVine

Related

Today, Apple has announced the beta release of Safari for Windows - the browser that will be shipped with every iPhone. This is great on multiple levels: Developers can finally run tests against the Safari browser without having a Mac (usually...
Google is now the most visited website in the world, at least according to comScore Networks. Previously, the title was held by Microsoft, which heavily benefits from everybody who has to go to their website for updates. How good is...

2 Comments »

TrackBack URI | Blog RSS | Comment RSS

  1. As am I… Write an article on how to get Safari on a PC :)

    Comment by Jackson — June 15, 2007 @ 10:48 am

  2. Scratch that one.

    Comment by Jackson — June 15, 2007 @ 10:50 am

What do you think?