Activate your free membership today | Log-in

Monday, November 30th, 2009

Statsy – find those wasted bytes with a bookmarklet

Category: Performance

Stoyan Stefanov is all about the performance of web products. One small tool that gives you a bit of insight as to where you can optimize is a new bookmarklet he released today called statsy.

If you run statsy on a web site you get the following insights:

  • JS attributes (e.g. onclick) – this is the sum of all onclick, onmouseover and so on including the attribute names. So for example <a onclick="#"> is 11 characters (bytes) of JavaScript attributes code
  • CSS style attributes – the sum of all style="..."
  • Inline JS – the sum of all the contents of all script tags (excluding the tag itself)
  • Inline CSS – sum of all <style> tag contents
  • All innerHTML – this is document.documentElement.innerHTML.length, it should be close to the ungzipped size of a page, provided the page is not doing a lot of DOM manipulation
  • # DOM elements – the total number of elements on the page is counted simply using document.getElementsByTagName('*').length

On Ajaxian, this is the result:

Statsy on Ajaxian by  you.

You can install statsy by dragging the following link to your link bar: Statsy and the source is also available.

Nothing earth-shattering but a good tool to use together with YSLow or PageSpeed.

Posted by Chris Heilmann at 7:14 am
4 Comments

+++--
3.4 rating from 12 votes

4 Comments »

Comments feed TrackBack URI

I’ve been using Inline Code Finder (https://addons.mozilla.org/en-US/firefox/addon/9640) for this kind of analysis. It actually highlights offenders and overall works wonderfully.

Comment by kangax — November 30, 2009

It should be close to the ungzipped size of a page, provided the page is not doing a lot of DOM manipulation.

http://www.getbestflowers.com

Comment by Punsons — November 30, 2009

Not that long ago Ed Hardy in a galaxy not that far away Ed Hardy Clothing we released an update Links London jewellery to Pharos IV Assault Ed Hardy Clothing sale This updates unleashes computer Cheap Ed Hardy Clothing assisted torpedo targeting Ed Hardy Clothing Sale for greater accuracy Cheap Ed Hardy resumption from highest level attained Links London no more starting over from level Ed Hardy Sale and fixed the stutter Discount Ed Hardy Clothing issue that affected iPhone Cheap Tiffany users Update is Tiffany and co for both iPhone Cheap Tiffany Jewelry Bartow Florida Cheap Tiffany and co After more than Links of London jewellery three decades in prison Tiffany and co UK a Florida man was set free Tiffany and co Jewelry Thursday after a DNA test showed he did not kidnap and rape a Tiffany and co sale year-old boy in 1974 Cheap Links of London jewellery I m not angry James Bain Tiffany told reporters after a brief hearing in Bartow Florida Tiffany Co Bain was 19 when he was convicted Tiffany sale on charges of kidnapping Links of London burglary and strong-arm rape Links of London jewelry He received a life sentence cheap Links of London He s going home for the Tiffany Jewelry first time in 35 years Links of London sale I got God in my head Tiffanys said Bain Tiffany Jewellery surrounded by supporters and wearing a Links of London UK T shirt with Not Guilty Tiffany UK across the front Discount Links of London .

Comment by maiyuan — December 31, 2009

thanks

Comment by Aphrodisiac — January 15, 2010

Leave a comment

You must be logged in to post a comment.