Advanced search  

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

Pages: [1]   Go Down

Author Topic: PHP memory usage  (Read 11838 times)

0 Members and 1 Guest are viewing this topic.

Fed

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 50
    • Imagetemple.com
PHP memory usage
« on: January 30, 2007, 12:56:34 am »

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

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: PHP memory usage
« Reply #1 on: January 30, 2007, 12:25:55 pm »

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

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 50
    • Imagetemple.com
Re: PHP memory usage
« Reply #2 on: January 30, 2007, 09:26:36 pm »

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

Nibbler

  • Guest
Re: PHP memory usage
« Reply #3 on: January 30, 2007, 10:28:13 pm »

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

Fed

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 50
    • Imagetemple.com
Re: PHP memory usage
« Reply #4 on: January 31, 2007, 10:12:18 am »

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
Logged

Nibbler

  • Guest
Re: PHP memory usage
« Reply #5 on: January 31, 2007, 02:14:15 pm »

Logged
Pages: [1]   Go Up
 

Page created in 0.027 seconds with 20 queries.