Re: Issue with GM through JNI

Tianyu Lang <[email protected]>
Newsgroups gmane.comp.video.graphicsmagick.help
Message-ID <CABR2W4-w8ak8C6g2iJfYcHkxBAoFbfcbxCOzj6Sch9ougEi9VA@mail.gmail.com>
Hi Bob,

The DSETJMP_IS_THREAD_SAFE build flag solved the performance problem with
libpng. However, we found out libjpeg also suffers from the same slowness
caused by locking.

We dug a little and found this line in jpeg.c:
entry=SetMagickInfo("JPEG");
entry->thread_support=False; /* libjpeg is not thread safe */

I did some research and according to here
<https://www.imagemagick.org/discourse-server/viewtopic.php?t=25495>, it
seems like libjpeg is thread safe as long as only one thread works on one
jpeg object. In that case, I am thinking if I can change the thread_support
to True to allow GM to output multiple JPEGs concurrently.

Or is there any other caveats?

Thanks so much for the help!
Tianyu

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
Graphicsmagick-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-help
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.