Re: 6.5.5 much slower than 6.3.6 (getpid problems)

[email protected] Wed, 23 Sep 2009 11:25:06 -0700
Newsgroups gmane.comp.video.image-magick.bugs
Message-ID <[email protected]>
> What I noticed is that imagemagick started working much much slower
> (6 times slower).

Before we release not only do we run several thousand regressions tests we also
run benchmarks.  We have seen a slight performance speed-up in the current
6.5.6 releases versus 6.5.5 and 6.5.4.

> So I straced it, and it tells me, that there are way to many "getpid"
> commands in it.

getpid() is called to initialize the random # generator and when logging.
Its possible that one of the C library calls in turn calls getpid().
We ran a test and called getpid() 1 million times and it ran so fast it did
not register any elapsed or user time.  The getpid() call should not be
significant when it comes to processing speed.

> The command I tried to run was:
> convert t1.jpg t2.jpg

We have a 2.83GHZ chip with 4GB of memory and we get

  convert logo: -resize 5000x5000 t1.jpg
  time convert t1.jpg t2.jpg
  convert t1.jpg t2.jpg  0.85s user 0.34s system 99% cpu 1.179 total

Which appears to be reasonable for a 5000x3750 image.  For a 640x480 image
we get:

  time convert logo: t2.jpg
  convert logo: t2.jpg  0.02s user 0.02s system 99% cpu 0.038 total

Are your times close to these?  If not, try building without OpenMP support.
We are finding thatome versions of libgomp slow ImageMagick down rather than
speed it up as it should:

  cd ImageMagick-6.5.6-4
  ./configure --disable-shared
  make
  make install