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

Shaola Ren commented on PDFBOX-2117:
------------------------------------

Yes, what you said is right, I only need to calculate the color on the axial 
line. Yes, I only looked at the source code, don't have a specific test file, 
my changes are only in PDFunction, they are not that critical, a little bit 
more efficient, I think. Yes, it's a good idea to make the exponent N as a 
field of PDFunctionType2. All these changes in the function package won't make 
a big difference, however, I think it's worth to make those changes, I'll take 
your suggestion, thanks.

There are no obvious flaw in type 2 shading, there is space to improve it, but 
the change may not be as big as we saw in type 6&7.

> AxialShadingContext is slow
> ---------------------------
>
>                 Key: PDFBOX-2117
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2117
>             Project: PDFBox
>          Issue Type: Sub-task
>          Components: Rendering
>            Reporter: Petr Slaby
>         Attachments: 000001_MTEXT_CS6.pdf, AxialShading.patch, 
> AxialShading1.patch, AxialShadingContext.java.getrgbimage, 
> Shading2Function2.pdf, Shading2Function2.ps, 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