[ https://issues.apache.org/jira/browse/PDFBOX-5443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17542105#comment-17542105 ]
Oliver Schmidtmer commented on PDFBOX-5443: ------------------------------------------- The BBox is 0 0 3827 842 for all of the TranparencyGroups. I think the clip is calculated from the path somewhere, or every transparency group would be that slow. I think the first slow one is x6 or x7. But besides a bit different coordinates x5 - x7 are the same and only one of them has no useful clipping area. Drawing the paths / filling is really fast. What causes this to be so slow is rendering to an image layer first and then blending (a page sized image ) this onto the page. Direct rendering to the page would be much faster over all. But changing that could be complicated, if softmasks are involved. > Clipping issues in TransparencyGroup > ------------------------------------ > > Key: PDFBOX-5443 > URL: https://issues.apache.org/jira/browse/PDFBOX-5443 > Project: PDFBox > Issue Type: Bug > Reporter: Oliver Schmidtmer > Priority: Major > Attachments: VarianteB - Demo.pdf, test-output-1.patch > > > The attached PDFs renders slow due to clipping issues when rendering > TransparencyGroups. > There are many TransparencyGroups, which only draw on a small area defined in > a path. > Unfortunately, for some, even mostly identical TransparencyGroups, the > clipping area is calculated to span the whole image. I've added a patchfile > for some test output: > {code:java} > path bounds: java.awt.Rectangle[x=3185,y=22,width=34,height=71] > drawing 0ms clip bounds: java.awt.Rectangle[x=0,y=-1,width=34,height=60] > path bounds: java.awt.Rectangle[x=3082,y=45,width=105,height=48] > drawing 127ms clip bounds: java.awt.Rectangle[x=0,y=0,width=3215,height=762] > path bounds: java.awt.Rectangle[x=3082,y=-25,width=34,height=71] > drawing 0ms clip bounds: java.awt.Rectangle[x=0,y=0,width=34,height=12] > path bounds: java.awt.Rectangle[x=3185,y=92,width=155,height=71] > drawing 0ms clip bounds: java.awt.Rectangle[x=0,y=0,width=87,height=71] > path bounds: java.awt.Rectangle[x=3185,y=22,width=34,height=71] > drawing 0ms clip bounds: java.awt.Rectangle[x=0,y=0,width=34,height=59] > path bounds: java.awt.Rectangle[x=2155,y=793,width=29,height=11] > drawing 0ms clip bounds: java.awt.Rectangle[x=0,y=0,width=29,height=3] > path bounds: java.awt.Rectangle[x=2146,y=793,width=10,height=20] > drawing 0ms clip bounds: java.awt.Rectangle[x=0,y=0,width=10,height=3] > path bounds: java.awt.Rectangle[x=1809,y=659,width=3,height=7] > path bounds: java.awt.Rectangle[x=1777,y=644,width=33,height=22] > path bounds: java.awt.Rectangle[x=1686,y=602,width=93,height=43] > path bounds: java.awt.Rectangle[x=1665,y=593,width=22,height=11] > path bounds: java.awt.Rectangle[x=1665,y=580,width=7,height=14] > path bounds: java.awt.Rectangle[x=1671,y=580,width=22,height=11] > path bounds: java.awt.Rectangle[x=1692,y=589,width=33,height=16] > path bounds: java.awt.Rectangle[x=1723,y=604,width=38,height=12] > path bounds: java.awt.Rectangle[x=1757,y=614,width=4,height=7] > path bounds: java.awt.Rectangle[x=1757,y=619,width=261,height=120] > path bounds: java.awt.Rectangle[x=2017,y=737,width=86,height=40] > path bounds: java.awt.Rectangle[x=2101,y=775,width=55,height=19] > drawing 126ms clip bounds: java.awt.Rectangle[x=0,y=0,width=3215,height=762] > path bounds: java.awt.Rectangle[x=2146,y=793,width=10,height=20] > drawing 0ms clip bounds: java.awt.Rectangle[x=0,y=0,width=10,height=3] > path bounds: java.awt.Rectangle[x=1811,y=659,width=336,height=154] > drawing 3ms clip bounds: java.awt.Rectangle[x=0,y=0,width=336,height=137] > path bounds: java.awt.Rectangle[x=388,y=356,width=893,height=2] > path bounds: java.awt.Rectangle[x=1280,y=356,width=62,height=29] > path bounds: java.awt.Rectangle[x=1326,y=383,width=16,height=3] > path bounds: java.awt.Rectangle[x=1306,y=384,width=21,height=7] > path bounds: java.awt.Rectangle[x=1135,y=389,width=172,height=12] > path bounds: java.awt.Rectangle[x=1030,y=390,width=106,height=11] > drawing 128ms clip bounds: > java.awt.Rectangle[x=0,y=0,width=3215,height=762]{code} -- This message was sent by Atlassian Jira (v8.20.7#820007) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org