Page 1 of 1

Performance issues - Database calls and GCBs

Posted: Tue Jun 22, 2010 9:51 am
by NikNak
Hi there

I am predominantly a designer rather than a coder, but I have been building a site where some pages are taking a long time to process. I have been using a variety of techniques to build my templates and I am wondering if there is a best practice way of doing things to make processing faster.

I have broken down my templates into manageable GCBs (Global Content Blocks), so I can change content on many templates in one go. For example my templates have GCBs for Headers, Menus, Footers and any common smarty routines. This makes each template much easier to understand and manage. But does this create any performance issues?

On pages that require listings of child pages (like a directory list) with specific content blocks shown, I can either do this through quite intensive smarty, or through a UDT (User defined tag) creating an array through a single database query. Is there a best option for performance? Is it always best to use Smarty?

The website will have maybe 200 pages - most of them being entries for shops. Am I right in thinking Smarty is making a cache of all the page contents all at once?  Could this be why the first page of the site takes so long to load? (on a shared server it sometimes took 40 seconds - on a semi dedicated server it now takes 5 seconds, which still feels slow).

My server has eAccelerator in place. (ps - I tried 2 seperate VPS solutions with 512mb ram and they were slower, even with eAccelerator !). MySQL is on the same server as the site. justhostme.co.uk

I ask these questions because the original site (I had decided to re-create in CMSMS) loaded pages very quickly (but the cms was very limiting to use). So the client could likely ask why it had become much less responsive.

I know there are other things that could speed up performance, like joining css and script files, but these probably wouldn't make enough of a difference compared with the page processing time needed - I really need to know if the things I'm currently doing have an adverse effect.

PS - Im not knocking CMSMS - I love it - but I need to know if I'm expecting too much.

Kind regards

Nik