Coffee and Code

The Life and Times of Jeff Woodman

For Performance Issues, Firebug Rocks

Posted: 20 Mar 2008 01:05 PM ::: 0 Comments ::: permaLink ::: Post a comment

Firebug!
Do you want real, ultimate, client-side debugging power? Get Firebug today.

This week I tackled some performance issues with my new weblog. I had noticed that the weblog took an awfully long time to load. So, I navigated to my weblog and launched Firebug. Firebug's network monitor quickly informed me that:

  • The request to the weblog page itself was averaging over 1 second in duration.
  • The size of the HTML response for the page was in excess of 50 Kb.
  • AJAX resources and Script.aculo.us libraries were unneccessarily loaded on every request - these are only needed in an authenticated context.

Damn, I loves me some Firebug!

Using this information, I determined that the ViewState (A hidden form tag on the page) content was sometimes as large as 23 Kb! In other words, the ViewState information accounted for almost 50% of the markup on the page.

Some minor code changes resulted in a HUGE reduction in the ViewState size. For one particular weblog entry, the viewstate was reduced from 23552 bytes to 236 bytes - a 98.99% difference!

In addition to the viewstate optimizations, I also did the following:

  • Reduced the total number of items that are fetched for each request to the page - From 17 to 5, on average.
  • Implemented caching where I could to reduce round-trips to the database (From 7 round-trips to 1 round-trip per request).
  • Replaced the Archive TreeView with a simple repeater. The TreeView is expensive to initialize and populate server side, and emits tables which are a Web 2.0 no-no in most cases.

If you're a web developer, Firebug will make your life easier. For ASP.Net developers, I also recommend Binary Fortress's ViewState Helper for Internet Explorer - This tool will decode viewstate for you so you can examine the contents, as well as giving you the ViewState size and percentage of the page's content that the ViewState consumes.

Filed under: development asp.net firebug tools


Birthday Loot!

Posted: 16 Mar 2008 09:59 PM ::: 0 Comments ::: permaLink ::: Post a comment

bday-loot-web.jpg
Left: AudioSource Db5 mobile speakers. Right: Flying Alarm Clock.

I received some excellent birthday loot this year. I hear that I have more on the way, too. Thanks everybody!

Pictured here:

  • AudioSource Db5 Personal Stereo Speakers
    The speakers feature a "3D sound" feature and fold in half for portability. They run on batteries or USB, are small enough to fit in your coat pocket, laptop bag or purse, and sound awesome! I have my network walkman plugged into them in the picture.
  • The Amazing Flying Alarm Clock
    When the (LOUD) alarm sounds, the helicopter apparatus flies off the top, taking the alarm's shut-off key with it. To disable the deafeningly loud klaxon, you have to get up, find the key, and return it to its base. By the time you've done that, you're awake enough to make a pot of coffee. Check out the Flying Alarm Clock in action at thinkgeek.com.

Filed under: personal humor holiday


Developer in Isolation Seeks Brain Candy

Posted: 04 Mar 2008 06:59 PM ::: 1 Comments ::: permaLink ::: Post a comment

I turn 31 tomorrow! Another year gone by - and I'm still just a big kid. When will I finally grow up? Never, hopefully. I took the day off and the party begins TONIGHT.

In Need of Variety

My current job consists almost entirely of programming. I actually picked this job specifically because it would allow me to focus on development - whereas in my previous job, my duties included graphic design, web design, ASP coding, Flash and ActionScript, server administration and database administration a sh**load of stuff.

I primarily design web applications for our intranet, which allows me to play with UI design a bit, but let's face it: you have to rein in your creative instincts quite a bit in the context of a corporate intranet. While this focused environment has allowed me to improve my development skills, I find myself jonesing once again for creative web design.

For the past two weeks or so, I've been dedicating some time to trolling the various CSS / web design galleries and web designer sites; I needed to crawl out of my digital coffin, put my ear to the ground, and get back in touch with the design community. Mind you, I am NOT a professional web designer. My designs don't come close to those produced by artists with real talent and skills to back it up. Even so, the process of web design is a lot of fun for me, and it's a great way to shift gears after writing volumes of code at work. I also like to promote CSS-based design and the use of W3C standards - two concepts that have the potential to make life easier for web designers and developers alike.

One of the first questions I had as I ventured into the wild was: What new and exciting things are designers doing these days?

Some answers:

Misdirected Energy

My biggest flash of inspiration came from this article at A List Apart (WTF!?!?!? There's a Web 3.0?? I'm not used to Web 2.0 yet!!!) Zeldman makes mention of Pareto's 80/20 principle in relation to web design; specifically remarking on the success of developers who, eschewing complex development methodologies and overblown, complex application designs, instead focused on creating elegant, easy-to-use, feature-rich applications that people find fun and enjoyable to use. There is much wisdom is this...

In the process of designing the current incarnation of my weblog utility for this site, I put way too much focus on the architecure, the "under the hood" stuff that users never see. I've got pluggable data sources, via the Provider model. I'm using XML serialization to generate RSS feeds. I'm patching in to the HTTP pipline to rewrite URLs. I've got a litany of business objects that my application uses. Abstract this, interface that. Ad nauseum.

I ended up with a weblogger that is useable, even over-powered, but it's feature-poor and doesn't encourage community involvement. I focused my energy on the 80% of the work that didn't matter as much. (Is this starting to sound like a future re-write project? I think it is.) A case of not seeing the forest through the trees, perhaps.

Filed under: development web-design inspiration

Author Bio

Jeff_Blog_Mugshot2.jpg

Jeff Woodman is a web developer living in Santa Fe, New Mexico, USA. He is passionate about coffee, scotch whiskey, and internet technologies. If you see him on the street, you may have to yell to get his attention, because he will most likely have some very loud punk rock playing on his MP3.

Other Places to Find Jeff

Jeff Woodman's Facebook profile
Add to Technorati Favorites Member of W3C Sites dot com
Jeff Woodman on Ma.gnolia.com

last.fm: