[ https://issues.apache.org/jira/browse/PDFBOX-2117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14058065#comment-14058065 ]
Tilman Hausherr commented on PDFBOX-2117: ----------------------------------------- [~xinshu] did you modify the two methods in PDFunction because of profiling observation, or just because the source seemed inefficient? I tried profiling a few renderings and the method was never used (probably rangeArray is null), so I'd be interested if you tested on a specific file. I found something else: in PDFunctionType2, getC1() and getC0() use no time, but getN() used 1 second of a 78 seconds rendering. For some reason, getN() isnt cached while the other two are. > 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)