PHP memory usage PHP memory usage
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

PHP memory usage

Started by Fed, January 30, 2007, 12:56:34 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Fed

Hello folks, this time I'm not talking about anything related to coppermine (no need to edit my coppermine)
I've developed a simple script that I use to upload images and resize them (using GD)
I don't know if it's normal but with some process monitoring utilities I've found out it uses 30-55 MB when dealing with images at 1600x1200 full quality ~1.8 MB (I run this rough test on my windows XP box running XAMPP)
do you think it's normal?
am i doing something wrong?
moreover, would it decrease if I used a lower quality for the produced image? which percentage of quality is acceptable in order not to have any perceivable loss of quality?

Stramm

a pic editing proggy or library can't handle compressed data. Therefore the picture always is in the momory uncompressed. That's the same for Photoshop, Gimp, ImageMagick or GD2. As said, not important is the pictures compressed size but its width, height and color depth. That's for your size ~8-10mb usage just for the image.

Fed

thanks stramm
and how much ram do you think it might use when creating a thumbnail and a mid size image? (GD2)
and what about writing on the image with http://en.php.net/manual/it/function.imagestring.php ?

Nibbler

Try it for yourself and you can see exactly how much it needs.

Fed

you're right Nibbler
actually I created this discussion because it seems I can't find any utility that allows me to accurately monitor memory usage on my windows computer
task manager and all the others I've tried don't track the usage of the script but bundle it with apache's overload