Re: PHP Fatal Error's

From: Date: Thu, 05 Oct 2006 18:39:44 +0000
Subject: Re: PHP Fatal Error's
References: 1 2 3 4  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-25356@lists.php.net to get a copy of this message
On 10/5/06, Raphaël Gertz <rapsys@free.fr> wrote:
Le jeudi 5 octobre 2006 18:42, Justin Patrin a écrit: On 10/5/06, Ben Sytko <bsytko@gmail.com> wrote:
Justin,
Sounds like your site can't keep up with the higher volume. Likely this is I/O that is causing the slowness. There are also other possible problems. There are plenty of resources on the net about optimizing your website. A first step might be to look at possibly caching some of your output so that PHP has to do less and so your DB isn't hit as much.
Ahh, so this is most likely a issue with the database dying? Beside optimizing the code, are their any other alternatives? I mean, is this an issue with PEAR that it can't handle large loads, or just a poor server? I've read that Smarty can be slow, would this have an impact? Would it be better to just drop Smarty and just make my own template engine?
You're making some false assumptions here. "PEAR" is not slow. Your usage of it may be, though. Smarty is IMHO just fine, as long as you're using the caches that it provides. There are 2 caches and you should try to make use of *both* of them. However, this is outside the scope of this list as Smarty is not a PEAR package. I again suggest you google for ways to make your scripts more efficient with an emphasis on caching your *final output*. The only problem with sigma and other template, is that if you use sessions and private data you can't use cache. (except if you separate the private data in an iframe or httpxmlrpc or something like that javascript code) Anyway if you have final output caching schema that are compatible to private user data with using sigma template I am interested for your answer... I have only beeing able to disable caching for the page that contain private data, if you have other idea, I am interested.
I don't know about sigma, but these kind of things can be dealt with in many different ways. You can set up a cache for your DB data (this may be no faster than normal DB access) or you can cache the output of the page for each user (so that they only have set get the page/info once) or you can cache parts of each page seperately. I don't know the spcifics about how to do this with any one system, but it should be pretty straightforward to just have 1 template for one part of the page, cached, and another template or some straight PHP for the other part which is not cached (or cached separetely). -- Justin Patrin

« previous php.pear.general (#25356) next »