Re: Includes eating up my time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dave M G wrote:
Currently, my processes are taking under a second, but they can be
around half a second or more. Although it all happens too fast for me to
really notice as a person, it seems to me that a half second of
processing time might be kind of long and lead to scalability problems.
That's hardly the worst performance I've seen from a CMS, but you should know that nearly all CMS systems are slow, many slower than this, for similar reasons. The solution is usually to build a front-end cache, either in the CMS itself or using an external tool. For instance, MODx caches internally, while others rely on Apache/Enfold/etc.
My first question is: Is a half second too long? I'm pretty sure it is,
but maybe I'm just being paranoid. What do people consider to be
acceptable time frames for processing a web page similar to what
Wikipedia delivers?
When you quote Wikipedia, you do realize that they're not a CMS, right, that they're a Wiki? There are some subtle differences. I haven't looked at Wikipedia's Wiki code (I like TWiki) but the Wikis I've used don't actually use a database or a billion classes to get their work done. They're more focused on editing an entire page of static content, which is stored on disk (and thus directly accessible by the server).

If you want that kind of scalability you also MUST implement some sort of caching. PHP is a scripting language, and no scripting language will ever keep up with compiled code, no matter how good (and PHP is good). You might also consider looking at the Zend Optimizer - I've never tried it, but have heard good things.
My second question is: Is there a systematic way of determining how to
incrementally include files that people use? Or is it just a constant
process of testing and checking?
PHP does have an auto-include system called the autoloader. We use this heavily in Blackbird ESB to load classes on the fly when they're referenced. It only works for loading classes, but since you say that's what you have... Take a look here:
http://us.php.net/autoload

Regards,
Chad

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux