• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

MySQL or XML to build a site template?

Status
Not open for further replies.
Custom Title Activated
Loyal Member
Joined
Dec 10, 2007
Messages
2,194
Reaction score
263
I was wondering what would be a more efficient way to build a template for my CMS.

At the moment, the template is being taken out of the MySQL database every time the site is loaded, and I'm worried that this will cause issues on a live production site with many visitors.

Here's how it looks like at the moment:


With that being said, would it be better performance wise to put the template into an XML file, or a simple txt file and getting the template from there.

:?:
 
Ginger by design.
Loyal Member
Joined
Feb 15, 2007
Messages
2,340
Reaction score
653

Why are you storing the template in SQL at all? SQL isn't your filesystem.

It'd be best to save it to a cache folder locally. Look into what Smarty does.
 
Custom Title Activated
Loyal Member
Joined
Dec 10, 2007
Messages
2,194
Reaction score
263
Is it really necessary to repeat the same thing multiple times?

Why are you storing the template in SQL at all? SQL isn't your filesystem.

At the time I was developing this CMS, this was the easiest way to go about it, and it was only on my localhost. Now that I have plans to use it on a bigger site, I am looking into possibly performance issues, and trying to get it as efficient as I can.

It'd be best to save it to a cache folder locally. Look into what Smarty does.
Thanks for the advice - I will be sure to look at Smarty. :8:

Anyways, closing this thread as my question has been answered.
 
Status
Not open for further replies.