Drupal

CDN module without a content delivery network

Modern web browsers put a cap on the number of connections they make to a host. This means if you've got a lot of assets on one hostname the browser will queue the remaining assets, while the ones in front download. This is referred to as blocking.

One way around blocking is to create multiple subdomains, for instance, assets0.davidstoline.com and assets1.davidstoline.com to increase the number of resources downloaded in parallel. This is method is called domain sharding and it is recommended by both Google's PageSpeed and Yahoo's YSlow.

I can't exactly afford a high quality CDN like Akamai but I can still leverage some of the benefits and fun of using a CDN. My friend Wim Leers wrote the Drupal CDN module, which you can leverage to do a little home grown sharding of your own.

Tags: 

Installing XHProf in MAMP for Drupal 6

XHProf is a hierarchical profiler for PHP. It reports function-level call counts and inclusive and exclusive metrics such as wall (elapsed) time, CPU time and memory usage. A function's profile can be broken down by callers or callees. The raw data collection component is implemented in C as a PHP Zend extension called xhprof. XHProf has a simple HTML based user interface (written in PHP). The browser based UI for viewing profiler results makes it easy to view results or to share results with peers. A callgraph image view is also supported.

So you're sold, but getting it installed in MAMP is kind of a pain.

A little about my setup system first. I'm running Mac OS X 10.6.4 with MAMP 1.9.2 with php 5.2.13 and you'll need Xcode.

Tags: 

Subscribe to RSS - Drupal