[OpenJDK 2D-Dev] Rendering images from PDF files slower in OpenJDK

Daniel Persson mailto.woden at gmail.com
Wed Sep 26 18:08:05 UTC 2018


Hi Phil

What the PDFBox team told me it could have something to do with color
mapping.

And my quick profiling shows that the code spends 29% of the time inside of
java.awt.image.ColorConvertOp.filter on java 11

But I'll open a issue.

Best regards
Daniel

On Wed, Sep 26, 2018, 19:33 Phil Race <philip.race at oracle.com> wrote:

> Multiple pieces are changing across these releases.
>
> Is it the JPEG writing ? Is it freetype vs t2k (font performance)
> is it harfbuzz vs icu (text layout), is it marlin vs ductus
> (rasterization) ?
>
> So it is very hard to say with any certainty what the cause of the
> difference is .. or
> why 10 got so much better than 9  .. even if still not back to JDK 8.
>
> Please file a bug at java.com.
>
> -phil.
>
> On 09/25/2018 10:42 PM, Daniel Persson wrote:
> > Hi everyone,
> >
> > We render a lot of images with PDFBox with Java 1.8.0 and we want to
> > upgrade to the current OpenJDK 11 but sadly we see some performance
> > degradation switching over to OpenJDK. Anyone have a suggestion to
> > remedy this issue, or can explain why it is slower?
> >
> > Using the PDFBox app current release downloadable from
> > http://www-us.apache.org/dist/pdfbox/2.0.11/pdfbox-app-2.0.11.jar
> >
> > Running the command
> > java -jar pdfbox-app-2.0.11.jar PDFToImage -time test.pdf
> >
> > We see the following result
> >
> > ---------------------------------------------------------
> > java version "1.8.0_181"
> > Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
> > Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
> > Rendered 1 page in 2762ms
> > ---------------------------------------------------------
> > openjdk version "9.0.4"
> > OpenJDK Runtime Environment (build 9.0.4+11)
> > OpenJDK 64-Bit Server VM (build 9.0.4+11, mixed mode)
> > Rendered 1 page in 8034ms
> > ---------------------------------------------------------
> > openjdk version "10.0.2" 2018-07-17
> > OpenJDK Runtime Environment 18.3 (build 10.0.2+13)
> > OpenJDK 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)
> > Rendered 1 page in 4255ms
> > ---------------------------------------------------------
> > openjdk version "11" 2018-09-25
> > OpenJDK Runtime Environment 18.9 (build 11+28)
> > OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)
> > Rendered 1 page in 4275ms
> > ---------------------------------------------------------
> > openjdk version "12-ea" 2019-03-19
> > OpenJDK Runtime Environment 19.3 (build 12-ea+11)
> > OpenJDK 64-Bit Server VM 19.3 (build 12-ea+11, mixed mode)
> > Rendered 1 page in 4399ms
> >
> > The pdf file used in this example can be downloaded from
> >
> https://drive.google.com/file/d/139wP6PDmmQ6KBTyeJTETIrplSuOUgFfG/view?usp=sharing
> >
> > Best regards
> > Daniel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20180926/f81eb009/attachment.html>


More information about the 2d-dev mailing list