Page 1 of 1

Spare memory with the modulemanager.

Posted: Mon Jun 09, 2008 11:44 am
by pb
You can spare memory .

Open ModuleManager.module.php and change  at line 1025 this:

Code: Select all

	    #$data = base64_decode( $data );
 	    $nbytes = @fwrite($fh,base64_decode( $data ));
 	    unset($data);

With originalversion $data = base64_decode( $data ) php makes a copy of $data (this need memory), in my version it writes directly to the file.

Re: Spare memory with the modulemanager.

Posted: Mon Jun 09, 2008 1:04 pm
by calguy1000
this does not fix anything
$data = base64_decode($data);

does EXACTLY the same thing as putting the call directly into a function, the only difference is using a named variable.

Re: Spare memory with the modulemanager.

Posted: Mon Jun 09, 2008 1:07 pm
by pb
Wow again.

Show memory_peak_usage  and that is it.