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

Petr Slaby commented on PDFBOX-2117:
------------------------------------

Oh, I missed the point. The color space classes are singletons. I will 
synchronize the lookup table access then. Better still would be to find a 
faster ICC profile color space implementation. It does a lot of float precision 
math, but in the end the RGB values are most usually converted to 8-bit. 
Rounding the input values in toRGB() to that precision would significantly 
improve the lookup table hit rate, but is probably not a right thing to do.

> AxialShadingContext is slow
> ---------------------------
>
>                 Key: PDFBOX-2117
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2117
>             Project: PDFBox
>          Issue Type: Improvement
>            Reporter: Petr Slaby
>         Attachments: AxialShading.patch, Shading2Function2text.pdf, 
> asy-shade.pdf, color_gradient.pdf, shading_pattern.pdf
>
>
> AxialShadingContext#getRaster() is on top of profiler hot spots in documents 
> that use an axial shading. Inside it, the slowest part is calling 
> PDColorSpaceRGB#toRGB() and PDFunctionType3#eval() (in this order).
>   



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to