Use ImageMagick on your webservers?
This thread just solved a big
convert
performance bottleneck for me, in which basic image operations (resize, sharpen, etc.) would take orders of magnitude more time than with older versions of ImageMagick and would saturate multiple CPU cores for far too long.Apparently, OpenMP isn’t very good yet for many-core, high-volume usage.
Compile ImageMagick with
--disable-openmp
and performance skyrockets.
That’s hilarious! I love all these “Just add a few pragmas (oh, and relearn everything you know about parallelism) and your app will SCALE LINEARLY with cores! OMG!” which then fall flat on their face in real world applications.
Anecdote from last WWDC: One of the very last sessions (that is, after everyone had been learning everything about the new kickass stuff in 10.6) was a session by Intel on Intel’s magical threading library Threading Building Blocks, comparing it to the new and shiny Grand Central Dispatch. They spend 70% of the presentation teaching us TBB (which everyone already knew) and pimping it real hard with a really slow, ugly and totally miscoded sample app that they gradually TBB’d. When they were done, it was time for the GCD comparison, in which they completely misunderstood how to use it, then tried to cram GCDisms into their app that was already architected entirely to fit TBB. Even though they stood up there and failed so hard it hurt at understanding GCD, their code STILL ran FASTER on GCD than with their own brainchild TBB! I wasn’t sure whether to laugh or cry.