Hi Andreas,
I will give it a try with my english. ;)

I analyzed a little bit the PDPage class. Due the fact that I want to
transform the page to an image, I often call PDPage.convertToImage(). So
this is my starting point for analyzing.

1. PageWriter:
Every time the convertToImage method is called there will be a new
PageDrawer created and the parent class PDFStreamEngine loads the resource
bundles.

Why not use some kind of a cache for loading the bundles? (Load resources
just ones)
Why not use one PageWriter for the whole document? (Just share it)

2. PageWriter:
Every time the convertToImage method is called there will be a
new BufferedImage+Graphics. (but not so expensive like Graphics2D.scale()
;))

Why not reuse a BufferedImage for all pages? It is faster to call
Graphics2d.fillRect() than creating a new one.



This is all until now. ;)


Best regards from Berlin,
Daniel

2008/11/11 <[EMAIL PROTECTED]>

> Hi Daniel,
>
> don't hesitate, I guess your suggestions are welcome wether they will
> included or not.
>
>
> Andreas
>
>
> -----Ursprüngliche Nachricht-----
> Von: Daniel Manzke [mailto:[EMAIL PROTECTED]
> Gesendet: Dienstag, 11. November 2008 12:49
> An: [email protected]
> Betreff: Performance Tuning
>
>
> Hi there,
> first I have to say:"Good job." It's really a nice project.
>
>
> I'm using the PDFBox for transforming PDF to Image. But I have some
> performance issues, so I had a look at the source code. I saw several points
> where I could save time. ;) Are you interested in them? I would prefer that
> we could discuss about this, because maybe it is as designed and my steps
> are dangerous.
>
>
>
> Best Regards,
> Daniel
>
> ----------------------------------------------------------------
> - Geschaeftsfuehrung: Chittur Ramakrishnan (Vorsitzender),
> Stefan Niehusmann -
> - Sitz der Gesellschaft: Dortmund -
> - Eingetragen beim Amtsgericht Dortmund -
> - Handelsregister-Nr. HR B 21222 -
> - USt.-IdNr. DE 2588 96 719 -
>



-- 
Mit freundlichen Grüßen

Daniel Manzke

Reply via email to