I recently blogged about my concerns over Hotaru's loading speed, but before I attempt Jon's suggestions of using Expires Headers and gzip, I thought I'd run some tests to see exactly what is consuming those valuable microseconds.
The first thing to note is the total time:
22 Jan 2010 12:52:22: INDEX TEMPLATE START - 1264132342.8745
22 Jan 2010 12:52:23: INDEX TEMPLATE END - 1264132343.9985
It took about 1.12 seconds which is well over my desired time
I've updated the demo site to v.1.0.2 (coming soon to the SVN trunk), but it's feeling really sluggish compared to these forums. I'm just not sure why.
Hotaru uses caching quite extensively, especially from the second page view. Here are the stats from the home page of the demo site:
52 database queries and a page load time of 1.8 seconds. This page used 6.9 MB bytes of memory. [Hotaru CMS v.1.0.2]
But it feels more like 6 seconds. Two processes which you would expect
I turned on Hotaru's debug mode last night and was shocked to see that my offline test site with JapanSoc imported into it was firing over 400 database queries on the front page!
Hotaru's "Debug" mode isn't really for debugging yet, but it does show you the number of database queries, the page load time and memory usage. Those last two were respectable enough, but those 400 database queries just wouldn't do. As a result, I've come up with a "smartCache" function.