RE: Smarty with vBulletin?
| From: | Matt Rogish | Date: | Thu, 21 Mar 2002 19:07:03 +0000 |
| Subject: | RE: Smarty with vBulletin? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3232@lists.php.net to get a copy of this message | ||
-----Original Message-----
From: Peter Bowyer [mailto:reywob@f2s.com]
Sent: Thursday, March 21, 2002 1:26 PM
To: Matt Rogish; smarty@lists.ispi.net
Subject: Re: [smarty] RE: Smarty with vBulletin?
> But it would still result in every database query being executed. Sure,
> the database results may be held in memory, but that's the same with any
> frequently accessed files. Using something like smarty with the PHP
> Accelerator <http://www.php-accelerator.co.uk> would
> result in just as low
> a number of disk reads, as the compiled templates would be cached in shm.
Correct; I find it easier to work with them in the database, however. We
have two web servers which are load balanced by a local director. If the
template files were on the file system I'd have to edit them on two boxen.
Maybe if I had a SAN/NAS solution but we don't have that kind of cash. :)
> If you're going to need the data secure should the server crash then
> everything should be backed up, not just the database.
Well, what I was trying to say is that on most applications the PHP files
change rarely, if ever. So it doesn't make sense to back them up more than
once. I know I don't, since I have a local copy (and we have it mirrored)
and it would be faster for me to FTP them up than find the tape, seek to the
PHP file location, etc.. However since the DB is being backed-up anyway,
the templates piggy-back on the backup. It's a minor issue and not one
which would make or break me choosing one or the other, just a slight
advantage. I know most ISPs when you're small-time is more diligent in
backing up their MySQL database than your web-files.
How does Smarty parse templates? I heard from a birdie that Smarty does
costly regexps (I'm looking through the source now to see).
--
Matt