> 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).

Only load what you need then :) Or rewrite in C.

> 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?

This is a very very complex process as there are a lot of dependencies
through out the symbol table especially when dealing with classes. APC
attempts this but doesnt do it brilliantly when classes are inherited etc.
The Zend Cache is the only fully reliable type of system you are talking
about I suggest you look at that.

- James


-- 
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]

Reply via email to