Spare memory with the modulemanager.

Do something cool with CMS? Show us ...
This board is for 'Answers', and the discussion of answers... Not for questions.
Post Reply
pb
Forum Members
Forum Members
Posts: 27
Joined: Sun Jun 01, 2008 8:41 pm

Spare memory with the modulemanager.

Post 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.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Spare memory with the modulemanager.

Post 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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
pb
Forum Members
Forum Members
Posts: 27
Joined: Sun Jun 01, 2008 8:41 pm

Re: Spare memory with the modulemanager.

Post by pb »

Wow again.

Show memory_peak_usage  and that is it.
Post Reply

Return to “Tips and Tricks”