After reading about the new JavaScript VM in Google Chrome (called V8) I was wondering how it would stack up against the new JS engines from Mozilla (TraceMonkey) and WebKit (SquirrelFish). I ran 3 tests across all the browsers, including IE8, and here are the results.
Setup:
Chrome [Build 1583 - 0.2.149.27]
FireFox 3.1 Nightly [1.9.1b1pre/200809020331]
- w/ javascript.options.jit.* set to true except in the SunSpider tests, where jit.content was set to false because it crashes.
WebKit Nightly [r36012]
Internet Explorer 8 [IE8 v8.0.6001.18241]
- I doubt numbers are accurate, asked me once for Chrome tests if I wanted to stop the unresponsive script, about 50x for Dromaeo
Inline images use the data: URL scheme to embed the image data in the actual page. This can increase the size of your HTML document. Combining inline images into your (cached) stylesheets is a way to reduce HTTP requests and avoid increasing the size of your pages. Inline images are not yet supported across all major browsers.
Reducing the number of connections is critical for client side performance. Due to the nature of mobile and mobile networks the problem is only amplified. A low hanging fruit has always been moving to css sprites for all your graphical resources. A lot of developers haven’t moved to inline images because not all browsers support it. However, web app developers on the iPhone have it much easier. We only have one browser to worry about, and luckily for us, it’s a good one.
It means that we can safely inline images and reduce the number of requests an iPhone user has to make across EDGE/3G.
There are 26 requests total for this page. If we take all the img tags and replace the src with the base64 encoded inline image we can reduce the number of requests to 13.
Any iPhone web app developer can do this right now in less than 30 mins. I used Grey Wyvern’s tool, but here’s some down and dirty php code I whipped together for local files that does the same thing:
So get out there, optimize, and save your users some valuable time!
Update: There have been some questions of busting the iPhone cache with this technique. As was documented on the YUI Blog the iPhone does not cache items over 25kb pre-gzip. If you’re going to use this technique just be aware that external resources linked are less than 25kb.
Comments (5) Posted by Wayne on Tuesday, August 26th, 2008
All the recent rumors circulating of Pandora’s demise, I started worry that my favorite iPhone app would soon be deactivated. Today, I do not care.
Why? Because I downloaded and set up SimplifyMedia. Now I can stream home iTunes library from anywhere! EDGE, 3G, WiFi, in my car, at the office, waiting in line… anywhere. My decision to save a $100 by going with the 8gb is going rather well.
Some tips for those with large iTunes libraries. Be patient and wait to Simplify to index all your music on your “server”. After that’s complete open up SimplifyMedia on your iPhone and keep it open. I was having trouble seeing all my songs on my iPhone but after I left the app open for 5 mins I was able to see my entire library.
Comments (0) Posted by Wayne on Monday, August 25th, 2008
Google released the closest look at their new Android software today through SDK 0.9. I’ve been playing around the the emulator (my second time with the platform mind you) and my overall feeling is that they’ve got all their bases covered and it’ll be a solid platform. The question is will it be something special?
Browser
The first app I dove into was the browser. I was mainly interested in the CSS animations that WebKit has been implementing. I visited the test page on Surfin’ Safari and 2/3 the demos worked. The spinning div does not work. Animations ala iPhone, which I covered here, are not supported however. That’s to be understood since those were more Mobile Safari specific.
Notifications
I noticed the notification system that appears if you swipe the title bar. Until Apple gets background apps working, this will be a huge competitive edge for Android. (Imagine all the chat applications that aren’t happening because you can’t background an App on the iPhone.)
Google Streetview
One feature that the iPhone Google Maps application is missing is Streetview. This is one feature where I can see Google telling Apple they are forbidden to implement thereby giving Android’s Google Maps a one up.
… and lastly
I’ll let the picture speak for itself.
Comments (0) Posted by Wayne on Monday, August 18th, 2008
I’ve been doing a lot of work with the iPhone lately and I’ve been holding back on blogging about my experiences because I’m unclear as to the damn NDA stipulations. NDA be damn, here’s a first in a series of posts!
If you aren’t familiar with the new animation framework that’s built into Mobile Safari you can read about the closest thing on WebKit, CSS transitions. Here is an example of a CSS transition:
<div style="-webkit-transition: opacity 2s ease-in"
onclick="this.style.opacity='0'">
This div will do a fade when clicked only Safari 3.1 or on the iPhone!
</div>
This div will do a fade when clicked Safari 3.1 or on the iPhone
Essentially you tie a timing function and duration when a css property is changed. CSS animations allow for more complex rule transitions. For example, if you want to have a card flipping effect show in this video, you will need to use CSS animations.
Is it just me or is there a definite lack of a good notes application on the iPhone. The built in Notes App is almost there except it doesn’t sync with MobileMe nor can I draw freehand on it! If the Apple Notes App did that I won’t have to look for an alternative, however, I do, and I did.
I downloaded a promising looking app called EverNote. It stores everything up in the cloud and all notes are completely indexed and searchable. You can save notes by taking a picture and it will OCR them. You can even save audio notes. All this, a OS X client, and iPhone client, and it’s FREE. I’m sold so I fire up the AppStore, download EverNote, and try to enter my first note. This is what I get:
There seems to be a bug where the note you’re typing is covered which makes the primary function of the app completely useless. My bar for usability is definitely higher than the average joe, but considering this app is competing against an Apple pre-installed version EverNote’s bar should be just as high.
Meanwhile, I’ll just have to keep looking.
Comments (0) Posted by Wayne on Thursday, August 7th, 2008
Does anybody else find it funny that Yuil, a demo made by a VP of Yahoo! to show off the Y!’s BOSS Search APIs, is supposed to be a parody of Cuil which in turn is supposed to be a Google-killer, is actually hosted on Google’s App Engine?
English majors, feel free to lambast me on my grammar in that last sentence.
Comments (0) Posted by Wayne on Wednesday, July 30th, 2008
Last Friday, at TC’s Mobile Wars, a couple AdMobsters and I were in attendance. Somewhere between the angry audience spectrum guy and Arrington looking up from his iPhone, my co-worker Josh was Twinkling around the room. He apparently struck up a conversation with a fellow audience member, Laura and they decided to meet up with each other.
All this is unbeknownst to me but soon after, while I was waiting in line for the August Capital after-party, Josh comes up and tells me that he met some guy named Joe Hewitt and that I might know him. Joe Hewitt? The Joe Hewitt? Mr. Firebug?
Josh offered to introduce us and, like a giddy school girl, I said, “HELL YES!” So we did. Nice guy that Joe is. We chatted about some iPhone stuff, firebug, webkit animations for a bit. Unfortunately, I didn’t get a chance to ask him about Parakey and what Facebook ended up doing with it.
Maybe next time…
Comments (2) Posted by Wayne on Tuesday, July 29th, 2008
We launched our AdMob iPhone ad units, developer contest, and publisher network. Shortly, if I can figure out if the webkit portion of the SDK is under NDA or not, I’ll be posting a postmortem on. If you watch the video below, you can see we did some amazing javascript and css stuff.
Comments (0) Posted by Wayne on Thursday, July 24th, 2008
Finally got around to putting up a blog... I'll posting my thoughts on the going ons in tech, javascript, ajax, ui, the mobile world, and life in general. Some posts will be about my latest javascript frustrations and other days my thoughts on the latest in tech.