Everyone loves graphs at the end of the year
24 DecAnd we are no exception. So to end the year, we've got some great graphs for you to show the difference between cached and uncached page views in MySource Mini.
Thankfully, we developed an advanced AOP-style baking system for MySource Mini that we call the Channels system. This allows us to bake out all possible execution paths in the CMS at install time so we are doing much less dynamic processing while serving content. It also allows us to bake out debug calls on developer systems so we can get a good idea of what is happening when we load a page or an editing interface. Along with our XML-based DB abstraction layer (DAL) logging database queries, we get a good look at how intensive a page load is.
In the images below, each little green dot is a function within MySource Mini and each coloured line is a function call. The colours mean something special in the Channels system, but that's for another day.
This first graph is what happens when serving the home page of the sample site that comes with MySource Mini. The site was published and the page was viewed as a public user.

It's pretty big! An awful lot happens behind the scenes while a page is loading in any CMS. It is all that complexity that we try and hide from content authors and site visitors. In this uncached page, we are calling 866 functions and executing 111 database queries in 0.32 seconds. There is a bit of optimisation we are doing, but the numbers are still around the right values.
When we turn caching on, we get a completely different graph.

You can see that the complexity of the page load is now much less. Now we are only calling 131 functions and executing 12 database queries in 0.11 seconds. So it is obvious that a good caching strategy is essential to ensure your system is devoting more resources to serving pages and less to actually building those pages.
If you are keen to see what is happening, you can download the graphs in PDF format:
- Download the uncached page view graph (PDF, 127KB)
- Download the cached page view graph (PDF, 57KB)