If you use a caching extension like APC (http://apc.communityconnect.com) or Zend Cache/Accelerator you get 1 and 2 below. APC at least implements basically what your looking for, I thnk.
----- Original Message ----- From: "Yermo M. Lamers" <[EMAIL PROTECTED]> To: "Markus Fischer" <[EMAIL PROTECTED]> Cc: "Andrey Hristov" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, November 26, 2001 12:30 PM Subject: Re: [PHP-DEV] Server-Wide Persistent objects in PHP? > > Markus, > > Yea, that's the problem. In my application, just loading the class files > on each page adds quite a bit of overhead. (1000's of lines of code). > > I've taken a look through the PHP/Zend source and it looks to me like it > would be possible to create a module built around a modified version of > php_execute_script() that: > > 1. loads, compiles and executes a script. > > 2. saves the state of the global tables Zend uses to > manage class definitions, objects, functions, variables, etc > (since there are so many globals used in Zend it doesn't look > like you can instantiate a second instance of the PHP interpreter > inside a single process, correct?) > > 3. exports some function calls to PHP that would allow object instances > (and their corresponding class definitions) to be imported into > the local name space. > > Ideally I'd set the module up so that all these classes and instantiation > happen in the php.ini file at server start time. Now wouldn't that be > cool? > > The question I have is what other hooks are there inside PHP that would > prevent this from working? Can I copy a pre-built symbol table (and class > definition table, etc) that I saved from a previous run of the PHP > interpreter (on a previous page) into a new one without having it crash? > > thanks, > > -- Yermo > > On Mon, 26 Nov 2001, Markus Fischer wrote: > > > On Mon, Nov 26, 2001 at 12:18:23PM -0500, Yermo M. Lamers wrote : > > > Question for you, when you serialize to a file do the class definitions > > > get serialized along with it or do you have to pre-load your classes > > > before you can unserialize? (that seems to be the way it works but I may > > > be mistaken). > > > > Class definition is not safed. > > > > - Markus > > > > --------------------------------------------------------------------- > DTLink Software [EMAIL PROTECTED] > Software Development and Consulting > --------------------------------------------------------------------- > > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]