[ 
https://issues.apache.org/jira/browse/PDFBOX-3900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16133354#comment-16133354
 ] 

ASF subversion and git services commented on PDFBOX-3900:
---------------------------------------------------------

Commit 1805452 from [~tilman] in branch 'pdfbox/branches/2.0'
[ https://svn.apache.org/r1805452 ]

PDFBOX-3900: optimize with lazy initialized map

> Optimize PDSeparation for shadings
> ----------------------------------
>
>                 Key: PDFBOX-3900
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3900
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: Rendering
>    Affects Versions: 2.0.7
>            Reporter: Tilman Hausherr
>            Assignee: Tilman Hausherr
>              Labels: optimization
>             Fix For: 2.0.8, 3.0.0
>
>
> {{PDSeparation.toRGB()}} isn't optimized yet. It is easy to optimize because 
> it is a single item color. However we can't use a float key like in image 
> conversion (which is optimized) because the method is called by shading, so 
> there may be an infinite number of keys and not just 256. Thus we'll multiply 
> with 255, cast to int and use that as key. Due to the different intervals, 
> the map can't be shared with the map from the two other conversions in the 
> class. It isn't needed either because the PDSeparation objects are usually 
> different, even if it is the same indirect object in the PDF.
> This optimization speeds up the rendering of [PDF.js issue 
> 8500|https://github.com/mozilla/pdf.js/issues/8500], it renders in 66 seconds 
> instead of 100. When rendering all my test files on my fast PC, overall time 
> (excluding the mentioned file) gets lowered by 10 seconds, so we save up to 
> 160 seconds somewhere.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to