Read/WriteOnePNGImage has a global lock which affects multithreading efficiency
Yuhan Guo <[email protected]> Thu, 3 Sep 2015 00:14:15 -0700
| Newsgroups | gmane.comp.video.graphicsmagick.bugs |
|---|---|
| Message-ID | <CAAtGL7+N_B4O+AdKnixwcZKE-W5z6==1_LiKrZyhdG+HxBed9A@mail.gmail.com> |
--===============5466686646800641139== Content-Type: multipart/alternative; boundary=089e013c6444e0c37b051ed28735 --089e013c6444e0c37b051ed28735 Content-Type: text/plain; charset=UTF-8 Hi All, We are using GraphicsMagick-1.3.21 version to do image processing. We found our program not picking up CPU usage even when load is high, and requests just keep piling up. We noticed that there is a png_semaphore in coders/png.c. And it serializes ReadOnePNGImage and WriteOnePNGImage calls in our multithreading environment. Which basically becomes the bottleneck of our program. I noticed that this lock is just for setjmp/longjmp to handle exceptions, and these calls are tricky and not necessarily thread-safe. Is there a way to get around with that? Thank you in advance! Best, Yuhan --089e013c6444e0c37b051ed28735 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Hi All,</div><div><br></div>We are using=C2=A0Graphic= sMagick-1.3.21 version to do image processing. We found our program not pic= king up CPU usage even when load is high, and requests just keep piling up.= <div><br></div><div>We noticed that there is a png_semaphore in coders/png.= c. And it serializes ReadOnePNGImage and WriteOnePNGImage calls in our mult= ithreading environment. Which basically becomes the bottleneck of our progr= am.</div><div><br></div><div>I noticed that this lock is just for setjmp/lo= ngjmp to handle exceptions, and these calls are tricky and not necessarily = thread-safe. Is there a way to get around with that?</div><div><br></div><d= iv>Thank you in advance!</div><div><br></div><div>Best,</div><div>Yuhan</di= v></div> --089e013c6444e0c37b051ed28735-- --===============5466686646800641139== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Monitor Your Dynamic Infrastructure at Any Scale With Datadog! Get real-time metrics from all of your servers, apps and tools in one place. SourceForge users - Click here to start your Free Trial of Datadog now! http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140 --===============5466686646800641139== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Graphicsmagick-bugs mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/graphicsmagick-bugs --===============5466686646800641139==--