Guy MacArthur Team : Web Development Tags : Web Development Umbraco

Do you need to update your Umbraco CMS?

Guy MacArthur Team : Web Development Tags : Web Development Umbraco

Sometimes you can code everything right, best practice all the way, and your Umbraco site still crawls.

This weekend, I spent a little time working on a client’s site from home. I pulled the project down from our source control and dug in. After a few hours of tearing things apart and putting them back together (hopefully in better shape than when I started; I have screws left over) I noticed my page refreshes were slow. Unacceptably slow.

Thankfully, my attention deficit disorder kicked in, I stopped working on my changes and started profiling the site. From my local PC in the office I typically get around 60 to 70ms response times for the server page response. What I was getting running the site from home was about a 4 second response time. The only difference from the office and home was the relative proximity and latency to the database. That set off alarm bells.

Umbraco is, for better or worse, a highly cached system. When developing a site on Umbraco, and using the cache as a strength, the database should rarely be accessed when someone is simply viewing the site, not taking into account interacting with forms and what-not. So, in theory, the site should be as responsive and snappy whether running at home, in the office, or elsewhere, as long as the hardware isn’t archaic.

Running the site under a performance profiler, it became clear that numerous database requests were firing off on every page request across the site. I won’t bore you any further with my amazing Nancy Drew’ing abilities, it was loading a few navigation and footer elements, amongst other things, which was causing the db requests.

We had installed, early on, a new third party property editor package for Umbraco V7, and it works like a treat. The package is the RJP Multi Url Picker, found here, and it offers a bit more than what you get out of the box with a vanilla install of Umbraco.

Now, don’t get me wrong, it’s a great property editor. What was happening was it was using a single call with an older API, uQuery, to get a bit of data, basically. Best practice, now, is to use a helper class, aptly named UmbracoHelper, for most of your published content data querying needs.

Going to the project website, lo and behold, my installed package version was a bit out of date. The issue had already been fixed, and I was about 2 minor revisions behind. After updating the package I was back to a very responsive site.

multi url picker with uQuery issue

The offending code. Version 1.0.

multi url picker without uQuery issue

As of version 1.2, it’s gone! The moral of the story, keep on top of your updates.

The Umbraco development team, many of the package developers and the large Umbraco community are very active. They identify issues, recommend feature additions and changes, and release updates at a pace much faster than many competing content management systems out there. That’s just one of the benefits of working with such an awesome product like the Umbraco CMS.