I don't know if I'm talking bullshit, but don't forget that each parameter
or return valeu in php, if not explicited as a pointer, it's a copy of the
full parameter.
This way, any

function a(myclass c)
{
    return c;
}

would create another copy of "c" in memory. Things get a bit larger when you
go with linked-list like structures in classes, where you have to take
really good care to don't duplicate data. If you're not taking care, then
maybe 5MB is normal.

IMHO, I agree with splitting the class into smaller functions. 370KB is a
big thing, that maybe useless. PHP isn't Java so you're not suposed to do a
"class mysite"

[]s
Fernando

"James H. Thompson" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> We have a good size PHP libary -- about 370KB of source code.
> Its one class with a multitude of small functions in it.
> just doing a require_once() on this library appears to use about 5MB of
> memory.(the change in VmSize in /proc/self/status)
>
> Is this a  normal ratio of PHP source code size to executable size?
>
>
> --
> Jim
>
> James H. Thompson
> [EMAIL PROTECTED]
>
>



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

Reply via email to