[jira] [Commented] (PDFBOX-5134) Very slow rendering on PageDrawer.shadingFill

2021-04-02 Thread ASF subversion and git services (Jira)


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

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

Commit 1888294 from Tilman Hausherr in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1888294 ]

PDFBOX-5134: remove accidentally committed inactive experimental code

> Very slow rendering on PageDrawer.shadingFill
> -
>
> Key: PDFBOX-5134
> URL: https://issues.apache.org/jira/browse/PDFBOX-5134
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.22, 2.0.23
>Reporter: Oliver Schmidtmer
>Priority: Major
>  Labels: optimization, shading
> Fix For: 2.0.24, 3.0.0 PDFBox
>
> Attachments: PDFBOX-4217-shade_via_1.3_006.pdf, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png-diff.png, Plan zum Testen.pdf, 
> gs-bugzilla687307-2.pdf, gs-bugzilla687307-2.pdf-1.png, 
> gs-bugzilla687307-2.pdf-1.png-diff.png, image-2021-03-17-20-16-49-221.png
>
>
> The PDF contains many effectively very small shadings, the light cones. As 
> the gradient painting for each light cone is applied on the whole image, 
> rendering is very slow: 29 of 33 seconds are spent in shadingFill.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5134) Very slow rendering on PageDrawer.shadingFill

2021-04-02 Thread ASF subversion and git services (Jira)


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

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

Commit 1888292 from Tilman Hausherr in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1888292 ]

PDFBOX-5134: Sonar fix

> Very slow rendering on PageDrawer.shadingFill
> -
>
> Key: PDFBOX-5134
> URL: https://issues.apache.org/jira/browse/PDFBOX-5134
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.22, 2.0.23
>Reporter: Oliver Schmidtmer
>Priority: Major
>  Labels: optimization, shading
> Fix For: 2.0.24, 3.0.0 PDFBox
>
> Attachments: PDFBOX-4217-shade_via_1.3_006.pdf, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png-diff.png, Plan zum Testen.pdf, 
> gs-bugzilla687307-2.pdf, gs-bugzilla687307-2.pdf-1.png, 
> gs-bugzilla687307-2.pdf-1.png-diff.png, image-2021-03-17-20-16-49-221.png
>
>
> The PDF contains many effectively very small shadings, the light cones. As 
> the gradient painting for each light cone is applied on the whole image, 
> rendering is very slow: 29 of 33 seconds are spent in shadingFill.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5134) Very slow rendering on PageDrawer.shadingFill

2021-04-02 Thread ASF subversion and git services (Jira)


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

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

Commit 1888293 from Tilman Hausherr in branch 'pdfbox/branches/2.0'
[ https://svn.apache.org/r1888293 ]

PDFBOX-5134: Sonar fix

> Very slow rendering on PageDrawer.shadingFill
> -
>
> Key: PDFBOX-5134
> URL: https://issues.apache.org/jira/browse/PDFBOX-5134
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.22, 2.0.23
>Reporter: Oliver Schmidtmer
>Priority: Major
>  Labels: optimization, shading
> Fix For: 2.0.24, 3.0.0 PDFBox
>
> Attachments: PDFBOX-4217-shade_via_1.3_006.pdf, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png-diff.png, Plan zum Testen.pdf, 
> gs-bugzilla687307-2.pdf, gs-bugzilla687307-2.pdf-1.png, 
> gs-bugzilla687307-2.pdf-1.png-diff.png, image-2021-03-17-20-16-49-221.png
>
>
> The PDF contains many effectively very small shadings, the light cones. As 
> the gradient painting for each light cone is applied on the whole image, 
> rendering is very slow: 29 of 33 seconds are spent in shadingFill.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5134) Very slow rendering on PageDrawer.shadingFill

2021-04-02 Thread Tilman Hausherr (Jira)


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

Tilman Hausherr commented on PDFBOX-5134:
-

The last commit speeds up the rendering of the file from
https://bugs.ghostscript.com/show_bug.cgi?id=690425
before this issue it took about 300 secs; after the initial commit 100 secs; 
now 1 sec. The last page of the ch14.pdf file is down to 200ms.

> Very slow rendering on PageDrawer.shadingFill
> -
>
> Key: PDFBOX-5134
> URL: https://issues.apache.org/jira/browse/PDFBOX-5134
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.22, 2.0.23
>Reporter: Oliver Schmidtmer
>Priority: Major
>  Labels: optimization, shading
> Fix For: 2.0.24, 3.0.0 PDFBox
>
> Attachments: PDFBOX-4217-shade_via_1.3_006.pdf, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png-diff.png, Plan zum Testen.pdf, 
> gs-bugzilla687307-2.pdf, gs-bugzilla687307-2.pdf-1.png, 
> gs-bugzilla687307-2.pdf-1.png-diff.png, image-2021-03-17-20-16-49-221.png
>
>
> The PDF contains many effectively very small shadings, the light cones. As 
> the gradient painting for each light cone is applied on the whole image, 
> rendering is very slow: 29 of 33 seconds are spent in shadingFill.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5134) Very slow rendering on PageDrawer.shadingFill

2021-04-02 Thread ASF subversion and git services (Jira)


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

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

Commit 1888290 from Tilman Hausherr in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1888290 ]

PDFBOX-5134: speed up by returning empty bounding box instead of null if no 
triangles

> Very slow rendering on PageDrawer.shadingFill
> -
>
> Key: PDFBOX-5134
> URL: https://issues.apache.org/jira/browse/PDFBOX-5134
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.22, 2.0.23
>Reporter: Oliver Schmidtmer
>Priority: Major
>  Labels: optimization, shading
> Fix For: 2.0.24, 3.0.0 PDFBox
>
> Attachments: PDFBOX-4217-shade_via_1.3_006.pdf, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png-diff.png, Plan zum Testen.pdf, 
> gs-bugzilla687307-2.pdf, gs-bugzilla687307-2.pdf-1.png, 
> gs-bugzilla687307-2.pdf-1.png-diff.png, image-2021-03-17-20-16-49-221.png
>
>
> The PDF contains many effectively very small shadings, the light cones. As 
> the gradient painting for each light cone is applied on the whole image, 
> rendering is very slow: 29 of 33 seconds are spent in shadingFill.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5134) Very slow rendering on PageDrawer.shadingFill

2021-04-02 Thread ASF subversion and git services (Jira)


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

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

Commit 1888291 from Tilman Hausherr in branch 'pdfbox/branches/2.0'
[ https://svn.apache.org/r1888291 ]

PDFBOX-5134: speed up by returning empty bounding box instead of null if no 
triangles

> Very slow rendering on PageDrawer.shadingFill
> -
>
> Key: PDFBOX-5134
> URL: https://issues.apache.org/jira/browse/PDFBOX-5134
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.22, 2.0.23
>Reporter: Oliver Schmidtmer
>Priority: Major
>  Labels: optimization, shading
> Fix For: 2.0.24, 3.0.0 PDFBox
>
> Attachments: PDFBOX-4217-shade_via_1.3_006.pdf, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png-diff.png, Plan zum Testen.pdf, 
> gs-bugzilla687307-2.pdf, gs-bugzilla687307-2.pdf-1.png, 
> gs-bugzilla687307-2.pdf-1.png-diff.png, image-2021-03-17-20-16-49-221.png
>
>
> The PDF contains many effectively very small shadings, the light cones. As 
> the gradient painting for each light cone is applied on the whole image, 
> rendering is very slow: 29 of 33 seconds are spent in shadingFill.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5134) Very slow rendering on PageDrawer.shadingFill

2021-04-02 Thread ASF subversion and git services (Jira)


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

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

Commit 1888288 from Tilman Hausherr in branch 'pdfbox/branches/2.0'
[ https://svn.apache.org/r1888288 ]

PDFBOX-5134: calculating the bounding boxes of the triangles reduces shading 
rendering times if no bounding box is preset, as suggested by Oliver 
Schmidtmer; Closes #109

> Very slow rendering on PageDrawer.shadingFill
> -
>
> Key: PDFBOX-5134
> URL: https://issues.apache.org/jira/browse/PDFBOX-5134
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.22, 2.0.23
>Reporter: Oliver Schmidtmer
>Priority: Major
>  Labels: optimization, shading
> Fix For: 2.0.24, 3.0.0 PDFBox
>
> Attachments: PDFBOX-4217-shade_via_1.3_006.pdf, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png-diff.png, Plan zum Testen.pdf, 
> gs-bugzilla687307-2.pdf, gs-bugzilla687307-2.pdf-1.png, 
> gs-bugzilla687307-2.pdf-1.png-diff.png, image-2021-03-17-20-16-49-221.png
>
>
> The PDF contains many effectively very small shadings, the light cones. As 
> the gradient painting for each light cone is applied on the whole image, 
> rendering is very slow: 29 of 33 seconds are spent in shadingFill.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5134) Very slow rendering on PageDrawer.shadingFill

2021-04-02 Thread ASF subversion and git services (Jira)


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

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

Commit 1888289 from Tilman Hausherr in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1888289 ]

PDFBOX-5134: calculating the bounding boxes of the triangles reduces shading 
rendering times if no bounding box is preset, as suggested by Oliver 
Schmidtmer; Closes #109

> Very slow rendering on PageDrawer.shadingFill
> -
>
> Key: PDFBOX-5134
> URL: https://issues.apache.org/jira/browse/PDFBOX-5134
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.22, 2.0.23
>Reporter: Oliver Schmidtmer
>Priority: Major
>  Labels: optimization, shading
> Fix For: 2.0.24, 3.0.0 PDFBox
>
> Attachments: PDFBOX-4217-shade_via_1.3_006.pdf, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png-diff.png, Plan zum Testen.pdf, 
> gs-bugzilla687307-2.pdf, gs-bugzilla687307-2.pdf-1.png, 
> gs-bugzilla687307-2.pdf-1.png-diff.png, image-2021-03-17-20-16-49-221.png
>
>
> The PDF contains many effectively very small shadings, the light cones. As 
> the gradient painting for each light cone is applied on the whole image, 
> rendering is very slow: 29 of 33 seconds are spent in shadingFill.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5134) Very slow rendering on PageDrawer.shadingFill

2021-03-31 Thread Tilman Hausherr (Jira)


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

Tilman Hausherr commented on PDFBOX-5134:
-

Tests are fine. (two "invisible" differences but I won't bother with these)

One file whose speed has improved tremendously is ch14.pdf from PDFBOX-615, one 
of the earliest examples. Back in 2014 the rendering of this file took 20 
minutes. (Or maybe it was the last page with the donut).

> Very slow rendering on PageDrawer.shadingFill
> -
>
> Key: PDFBOX-5134
> URL: https://issues.apache.org/jira/browse/PDFBOX-5134
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.22, 2.0.23
>Reporter: Oliver Schmidtmer
>Priority: Major
>  Labels: optimization, shading
> Attachments: PDFBOX-4217-shade_via_1.3_006.pdf, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png-diff.png, Plan zum Testen.pdf, 
> gs-bugzilla687307-2.pdf, gs-bugzilla687307-2.pdf-1.png, 
> gs-bugzilla687307-2.pdf-1.png-diff.png, image-2021-03-17-20-16-49-221.png
>
>
> The PDF contains many effectively very small shadings, the light cones. As 
> the gradient painting for each light cone is applied on the whole image, 
> rendering is very slow: 29 of 33 seconds are spent in shadingFill.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5134) Very slow rendering on PageDrawer.shadingFill

2021-03-31 Thread Oliver Schmidtmer (Jira)


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

Oliver Schmidtmer commented on PDFBOX-5134:
---

Yeah, my comment wasn't clear in that point. I never changed them to be 
calculated only once after your clarification, only intended to it earlier to 
that answer :)

> Very slow rendering on PageDrawer.shadingFill
> -
>
> Key: PDFBOX-5134
> URL: https://issues.apache.org/jira/browse/PDFBOX-5134
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.22, 2.0.23
>Reporter: Oliver Schmidtmer
>Priority: Major
>  Labels: optimization, shading
> Attachments: PDFBOX-4217-shade_via_1.3_006.pdf, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png-diff.png, Plan zum Testen.pdf, 
> gs-bugzilla687307-2.pdf, gs-bugzilla687307-2.pdf-1.png, 
> gs-bugzilla687307-2.pdf-1.png-diff.png, image-2021-03-17-20-16-49-221.png
>
>
> The PDF contains many effectively very small shadings, the light cones. As 
> the gradient painting for each light cone is applied on the whole image, 
> rendering is very slow: 29 of 33 seconds are spent in shadingFill.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5134) Very slow rendering on PageDrawer.shadingFill

2021-03-31 Thread Tilman Hausherr (Jira)


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

Tilman Hausherr commented on PDFBOX-5134:
-

I looked again and now think I missed or misunderstood one commit, you DID make 
a change that the triangle list is calculated twice (once with identity and 
once with actual xform). Thus wait for it to be integrated. I might run a test 
now but if it is good I'll then put this in 2.0 and will commit within the long 
easter weekend.

> Very slow rendering on PageDrawer.shadingFill
> -
>
> Key: PDFBOX-5134
> URL: https://issues.apache.org/jira/browse/PDFBOX-5134
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.22, 2.0.23
>Reporter: Oliver Schmidtmer
>Priority: Major
>  Labels: optimization, shading
> Attachments: PDFBOX-4217-shade_via_1.3_006.pdf, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png-diff.png, Plan zum Testen.pdf, 
> gs-bugzilla687307-2.pdf, gs-bugzilla687307-2.pdf-1.png, 
> gs-bugzilla687307-2.pdf-1.png-diff.png, image-2021-03-17-20-16-49-221.png
>
>
> The PDF contains many effectively very small shadings, the light cones. As 
> the gradient painting for each light cone is applied on the whole image, 
> rendering is very slow: 29 of 33 seconds are spent in shadingFill.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5134) Very slow rendering on PageDrawer.shadingFill

2021-03-31 Thread Oliver Schmidtmer (Jira)


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

Oliver Schmidtmer commented on PDFBOX-5134:
---

Is there anything I should change, or should I wait for the changes to be 
integrated?

> Very slow rendering on PageDrawer.shadingFill
> -
>
> Key: PDFBOX-5134
> URL: https://issues.apache.org/jira/browse/PDFBOX-5134
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.22, 2.0.23
>Reporter: Oliver Schmidtmer
>Priority: Major
>  Labels: optimization, shading
> Attachments: PDFBOX-4217-shade_via_1.3_006.pdf, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png-diff.png, Plan zum Testen.pdf, 
> gs-bugzilla687307-2.pdf, gs-bugzilla687307-2.pdf-1.png, 
> gs-bugzilla687307-2.pdf-1.png-diff.png, image-2021-03-17-20-16-49-221.png
>
>
> The PDF contains many effectively very small shadings, the light cones. As 
> the gradient painting for each light cone is applied on the whole image, 
> rendering is very slow: 29 of 33 seconds are spent in shadingFill.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5134) Very slow rendering on PageDrawer.shadingFill

2021-03-21 Thread Oliver Schmidtmer (Jira)


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

Oliver Schmidtmer commented on PDFBOX-5134:
---

Then I think we need to calculate them twice: As xform is probably also set on 
the graphics state, at least I think thats the reason, I need to calculate the 
bounds with an identity transform instead of xform.

> Very slow rendering on PageDrawer.shadingFill
> -
>
> Key: PDFBOX-5134
> URL: https://issues.apache.org/jira/browse/PDFBOX-5134
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.22, 2.0.23
>Reporter: Oliver Schmidtmer
>Priority: Major
>  Labels: optimization, shading
> Attachments: PDFBOX-4217-shade_via_1.3_006.pdf, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png-diff.png, Plan zum Testen.pdf, 
> gs-bugzilla687307-2.pdf, gs-bugzilla687307-2.pdf-1.png, 
> gs-bugzilla687307-2.pdf-1.png-diff.png, image-2021-03-17-20-16-49-221.png
>
>
> The PDF contains many effectively very small shadings, the light cones. As 
> the gradient painting for each light cone is applied on the whole image, 
> rendering is very slow: 29 of 33 seconds are spent in shadingFill.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5134) Very slow rendering on PageDrawer.shadingFill

2021-03-21 Thread Tilman Hausherr (Jira)


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

Tilman Hausherr commented on PDFBOX-5134:
-

Oops, yes, I forgot that one. xform is based on the current resolution so this 
is a big YES. ctm is the current transformation matrix, which are transforms 
within the PDF itself, so it is allowed.

> Very slow rendering on PageDrawer.shadingFill
> -
>
> Key: PDFBOX-5134
> URL: https://issues.apache.org/jira/browse/PDFBOX-5134
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.22, 2.0.23
>Reporter: Oliver Schmidtmer
>Priority: Major
>  Labels: optimization, shading
> Attachments: PDFBOX-4217-shade_via_1.3_006.pdf, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png-diff.png, Plan zum Testen.pdf, 
> gs-bugzilla687307-2.pdf, gs-bugzilla687307-2.pdf-1.png, 
> gs-bugzilla687307-2.pdf-1.png-diff.png, image-2021-03-17-20-16-49-221.png
>
>
> The PDF contains many effectively very small shadings, the light cones. As 
> the gradient painting for each light cone is applied on the whole image, 
> rendering is very slow: 29 of 33 seconds are spent in shadingFill.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5134) Very slow rendering on PageDrawer.shadingFill

2021-03-21 Thread Oliver Schmidtmer (Jira)


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

Oliver Schmidtmer commented on PDFBOX-5134:
---

Lazy init in the getters, good idea. Done.

As for caching and reusing the triangles, when either bounds or context are 
created: Is it possible that a shading is reused with a different set of 
matrices?

> Very slow rendering on PageDrawer.shadingFill
> -
>
> Key: PDFBOX-5134
> URL: https://issues.apache.org/jira/browse/PDFBOX-5134
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.22, 2.0.23
>Reporter: Oliver Schmidtmer
>Priority: Major
>  Labels: optimization, shading
> Attachments: PDFBOX-4217-shade_via_1.3_006.pdf, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png-diff.png, Plan zum Testen.pdf, 
> gs-bugzilla687307-2.pdf, gs-bugzilla687307-2.pdf-1.png, 
> gs-bugzilla687307-2.pdf-1.png-diff.png, image-2021-03-17-20-16-49-221.png
>
>
> The PDF contains many effectively very small shadings, the light cones. As 
> the gradient painting for each light cone is applied on the whole image, 
> rendering is very slow: 29 of 33 seconds are spent in shadingFill.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5134) Very slow rendering on PageDrawer.shadingFill

2021-03-21 Thread Jira


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

Andreas Lehmkühler commented on PDFBOX-5134:


IMHO it would makr sense to move the initialization of {{bitsPerCoordinate}} 
and {{bitsPerColorComponent}} to the existing getters and use those instead of 
the member variables. Adding a new getter for {{numberOfColorComponents}} 
should eliminate the need for throwing an IOExcpetion

> Very slow rendering on PageDrawer.shadingFill
> -
>
> Key: PDFBOX-5134
> URL: https://issues.apache.org/jira/browse/PDFBOX-5134
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.22, 2.0.23
>Reporter: Oliver Schmidtmer
>Priority: Major
>  Labels: optimization, shading
> Attachments: PDFBOX-4217-shade_via_1.3_006.pdf, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png-diff.png, Plan zum Testen.pdf, 
> gs-bugzilla687307-2.pdf, gs-bugzilla687307-2.pdf-1.png, 
> gs-bugzilla687307-2.pdf-1.png-diff.png, image-2021-03-17-20-16-49-221.png
>
>
> The PDF contains many effectively very small shadings, the light cones. As 
> the gradient painting for each light cone is applied on the whole image, 
> rendering is very slow: 29 of 33 seconds are spent in shadingFill.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5134) Very slow rendering on PageDrawer.shadingFill

2021-03-20 Thread Tilman Hausherr (Jira)


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

Tilman Hausherr commented on PDFBOX-5134:
-

The constructor now throws an IOException which would break the API, thus 
making it impossible that the 2.0 branch could profit from your optimization. 
How about collecting the triangles when needed, i.e. when getting the bounds or 
when the context is created?

> Very slow rendering on PageDrawer.shadingFill
> -
>
> Key: PDFBOX-5134
> URL: https://issues.apache.org/jira/browse/PDFBOX-5134
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.22, 2.0.23
>Reporter: Oliver Schmidtmer
>Priority: Major
>  Labels: optimization, shading
> Attachments: PDFBOX-4217-shade_via_1.3_006.pdf, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png-diff.png, Plan zum Testen.pdf, 
> gs-bugzilla687307-2.pdf, gs-bugzilla687307-2.pdf-1.png, 
> gs-bugzilla687307-2.pdf-1.png-diff.png, image-2021-03-17-20-16-49-221.png
>
>
> The PDF contains many effectively very small shadings, the light cones. As 
> the gradient painting for each light cone is applied on the whole image, 
> rendering is very slow: 29 of 33 seconds are spent in shadingFill.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5134) Very slow rendering on PageDrawer.shadingFill

2021-03-20 Thread Oliver Schmidtmer (Jira)


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

Oliver Schmidtmer commented on PDFBOX-5134:
---

Yeah, was definately a bit of work, but I thought: why not :)

Increasing the bounding box by a safety margin is in. Disposing obsolete by 
this refactoring.

> Very slow rendering on PageDrawer.shadingFill
> -
>
> Key: PDFBOX-5134
> URL: https://issues.apache.org/jira/browse/PDFBOX-5134
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.22, 2.0.23
>Reporter: Oliver Schmidtmer
>Priority: Major
>  Labels: optimization, shading
> Attachments: PDFBOX-4217-shade_via_1.3_006.pdf, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png-diff.png, Plan zum Testen.pdf, 
> gs-bugzilla687307-2.pdf, gs-bugzilla687307-2.pdf-1.png, 
> gs-bugzilla687307-2.pdf-1.png-diff.png, image-2021-03-17-20-16-49-221.png
>
>
> The PDF contains many effectively very small shadings, the light cones. As 
> the gradient painting for each light cone is applied on the whole image, 
> rendering is very slow: 29 of 33 seconds are spent in shadingFill.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5134) Very slow rendering on PageDrawer.shadingFill

2021-03-20 Thread Jira


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

Andreas Lehmkühler commented on PDFBOX-5134:


[~tilman] That's a reasonable point 

> Very slow rendering on PageDrawer.shadingFill
> -
>
> Key: PDFBOX-5134
> URL: https://issues.apache.org/jira/browse/PDFBOX-5134
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.22, 2.0.23
>Reporter: Oliver Schmidtmer
>Priority: Major
>  Labels: optimization, shading
> Attachments: PDFBOX-4217-shade_via_1.3_006.pdf, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png-diff.png, Plan zum Testen.pdf, 
> gs-bugzilla687307-2.pdf, gs-bugzilla687307-2.pdf-1.png, 
> gs-bugzilla687307-2.pdf-1.png-diff.png, image-2021-03-17-20-16-49-221.png
>
>
> The PDF contains many effectively very small shadings, the light cones. As 
> the gradient painting for each light cone is applied on the whole image, 
> rendering is very slow: 29 of 33 seconds are spent in shadingFill.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5134) Very slow rendering on PageDrawer.shadingFill

2021-03-20 Thread Tilman Hausherr (Jira)


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

Tilman Hausherr commented on PDFBOX-5134:
-

Yes that would be the more elegant thing to do, but it's more work 

> Very slow rendering on PageDrawer.shadingFill
> -
>
> Key: PDFBOX-5134
> URL: https://issues.apache.org/jira/browse/PDFBOX-5134
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.22, 2.0.23
>Reporter: Oliver Schmidtmer
>Priority: Major
>  Labels: optimization, shading
> Attachments: PDFBOX-4217-shade_via_1.3_006.pdf, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png-diff.png, Plan zum Testen.pdf, 
> gs-bugzilla687307-2.pdf, gs-bugzilla687307-2.pdf-1.png, 
> gs-bugzilla687307-2.pdf-1.png-diff.png, image-2021-03-17-20-16-49-221.png
>
>
> The PDF contains many effectively very small shadings, the light cones. As 
> the gradient painting for each light cone is applied on the whole image, 
> rendering is very slow: 29 of 33 seconds are spent in shadingFill.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5134) Very slow rendering on PageDrawer.shadingFill

2021-03-20 Thread Jira


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

Andreas Lehmkühler commented on PDFBOX-5134:


Would it be helpful if {{collectTriangles}} is moved from 
{{Type4ShadingContext}} to {{PDShadingType4}} and so on? Looks like it uses 
information provided by {{PDShadingType4}} only. One won't have to create a 
context to get the data to calculate the bounds.

> Very slow rendering on PageDrawer.shadingFill
> -
>
> Key: PDFBOX-5134
> URL: https://issues.apache.org/jira/browse/PDFBOX-5134
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.22, 2.0.23
>Reporter: Oliver Schmidtmer
>Priority: Major
>  Labels: optimization, shading
> Attachments: PDFBOX-4217-shade_via_1.3_006.pdf, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png-diff.png, Plan zum Testen.pdf, 
> gs-bugzilla687307-2.pdf, gs-bugzilla687307-2.pdf-1.png, 
> gs-bugzilla687307-2.pdf-1.png-diff.png, image-2021-03-17-20-16-49-221.png
>
>
> The PDF contains many effectively very small shadings, the light cones. As 
> the gradient painting for each light cone is applied on the whole image, 
> rendering is very slow: 29 of 33 seconds are spent in shadingFill.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5134) Very slow rendering on PageDrawer.shadingFill

2021-03-20 Thread Tilman Hausherr (Jira)


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

Tilman Hausherr commented on PDFBOX-5134:
-

We could misuse the colormodel parameter. If it is null, then don't calculate 
the shading points.

> Very slow rendering on PageDrawer.shadingFill
> -
>
> Key: PDFBOX-5134
> URL: https://issues.apache.org/jira/browse/PDFBOX-5134
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.22, 2.0.23
>Reporter: Oliver Schmidtmer
>Priority: Major
>  Labels: optimization, shading
> Attachments: PDFBOX-4217-shade_via_1.3_006.pdf, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png-diff.png, Plan zum Testen.pdf, 
> gs-bugzilla687307-2.pdf, gs-bugzilla687307-2.pdf-1.png, 
> gs-bugzilla687307-2.pdf-1.png-diff.png, image-2021-03-17-20-16-49-221.png
>
>
> The PDF contains many effectively very small shadings, the light cones. As 
> the gradient painting for each light cone is applied on the whole image, 
> rendering is very slow: 29 of 33 seconds are spent in shadingFill.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5134) Very slow rendering on PageDrawer.shadingFill

2021-03-20 Thread Tilman Hausherr (Jira)


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

Tilman Hausherr commented on PDFBOX-5134:
-

I overlooked a problem: \{{createContext()}} creates the class and the 
calculation of the shading points is done in the constructor. So now the 
calculation would be done twice. It's possible that this was the cause of the 
"freeze" (which have reappeared sometimes).

> Very slow rendering on PageDrawer.shadingFill
> -
>
> Key: PDFBOX-5134
> URL: https://issues.apache.org/jira/browse/PDFBOX-5134
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.22, 2.0.23
>Reporter: Oliver Schmidtmer
>Priority: Major
>  Labels: optimization, shading
> Attachments: PDFBOX-4217-shade_via_1.3_006.pdf, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png, 
> PDFBOX-4217-shade_via_1.3_006.pdf-1.png-diff.png, Plan zum Testen.pdf, 
> gs-bugzilla687307-2.pdf, gs-bugzilla687307-2.pdf-1.png, 
> gs-bugzilla687307-2.pdf-1.png-diff.png, image-2021-03-17-20-16-49-221.png
>
>
> The PDF contains many effectively very small shadings, the light cones. As 
> the gradient painting for each light cone is applied on the whole image, 
> rendering is very slow: 29 of 33 seconds are spent in shadingFill.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5134) Very slow rendering on PageDrawer.shadingFill

2021-03-20 Thread Tilman Hausherr (Jira)


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

Tilman Hausherr commented on PDFBOX-5134:
-

I tested your changes and had many invisible differences, and two slightly 
visible (gs-bugzilla687307-2.pdf and PDFBOX-4217-shade_via_1.3_006.pdf). I got 
rid of most of them with this code in the two context classes:
{code:java}
if (bounds != null)
{
bounds.add(new Point((int) Math.floor(bounds.getMinX())-1, (int) 
Math.floor(bounds.getMinY())-1));
bounds.add(new Point((int) Math.ceil(bounds.getMaxX())+1, (int) 
Math.ceil(bounds.getMaxY())+1));
} {code}
 

Another problem was that the rendering tests sometimes froze for a minute, then 
went on. Apparently I got rid of that by calling {{dispose()}} on the context 
after it's done.

> Very slow rendering on PageDrawer.shadingFill
> -
>
> Key: PDFBOX-5134
> URL: https://issues.apache.org/jira/browse/PDFBOX-5134
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.22, 2.0.23
>Reporter: Oliver Schmidtmer
>Priority: Major
>  Labels: optimization, shading
> Attachments: PDFBOX-4217-shade_via_1.3_006.pdf, Plan zum Testen.pdf, 
> image-2021-03-17-20-16-49-221.png
>
>
> The PDF contains many effectively very small shadings, the light cones. As 
> the gradient painting for each light cone is applied on the whole image, 
> rendering is very slow: 29 of 33 seconds are spent in shadingFill.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5134) Very slow rendering on PageDrawer.shadingFill

2021-03-19 Thread Tilman Hausherr (Jira)


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

Tilman Hausherr commented on PDFBOX-5134:
-

This sounds good!

> Very slow rendering on PageDrawer.shadingFill
> -
>
> Key: PDFBOX-5134
> URL: https://issues.apache.org/jira/browse/PDFBOX-5134
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.22, 2.0.23
>Reporter: Oliver Schmidtmer
>Priority: Major
>  Labels: optimization, shading
> Attachments: Plan zum Testen.pdf, image-2021-03-17-20-16-49-221.png
>
>
> The PDF contains many effectively very small shadings, the light cones. As 
> the gradient painting for each light cone is applied on the whole image, 
> rendering is very slow: 29 of 33 seconds are spent in shadingFill.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5134) Very slow rendering on PageDrawer.shadingFill

2021-03-19 Thread Oliver Schmidtmer (Jira)


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

Oliver Schmidtmer commented on PDFBOX-5134:
---

So for the visibility, what about moving "getBounds" up to the already visible 
ShadingContext, using a default implementation which returns null?

> Very slow rendering on PageDrawer.shadingFill
> -
>
> Key: PDFBOX-5134
> URL: https://issues.apache.org/jira/browse/PDFBOX-5134
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.22, 2.0.23
>Reporter: Oliver Schmidtmer
>Priority: Major
>  Labels: optimization, shading
> Attachments: Plan zum Testen.pdf, image-2021-03-17-20-16-49-221.png
>
>
> The PDF contains many effectively very small shadings, the light cones. As 
> the gradient painting for each light cone is applied on the whole image, 
> rendering is very slow: 29 of 33 seconds are spent in shadingFill.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5134) Very slow rendering on PageDrawer.shadingFill

2021-03-18 Thread Oliver Schmidtmer (Jira)


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

Oliver Schmidtmer commented on PDFBOX-5134:
---

At least for the types i've overlooked the mesh based. So those are implemented 
now too.

> Very slow rendering on PageDrawer.shadingFill
> -
>
> Key: PDFBOX-5134
> URL: https://issues.apache.org/jira/browse/PDFBOX-5134
> Project: PDFBox
>  Issue Type: Bug
>Reporter: Oliver Schmidtmer
>Priority: Major
>  Labels: shading
> Attachments: Plan zum Testen.pdf, image-2021-03-17-20-16-49-221.png
>
>
> The PDF contains many effectively very small shadings, the light cones. As 
> the gradient painting for each light cone is applied on the whole image, 
> rendering is very slow: 29 of 33 seconds are spent in shadingFill.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5134) Very slow rendering on PageDrawer.shadingFill

2021-03-18 Thread Tilman Hausherr (Jira)


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

Tilman Hausherr commented on PDFBOX-5134:
-

Thanks, I tested this, and hit a few minor problems:
- context.getBounds() can be null
- PDTriangleBasedShadingType is also types 6 and 7, which do not produce a 
GouraudShadingContext
 Sadly types 6 and 7 are derived from type 4, so for the test I checked the 
class name like this \{{shading.getClass().getName().endsWith("4") || 
shading.getClass().getName().endsWith("5")}}.
- in one case, the context is a SoftMask
I avoided all these and all renderings are fine!

Another problem is making stuff public. We usually try to avoid that, because 
the more there is public, the more there is a risk of people using the API in 
weird ways that we haven't thought about.

> Very slow rendering on PageDrawer.shadingFill
> -
>
> Key: PDFBOX-5134
> URL: https://issues.apache.org/jira/browse/PDFBOX-5134
> Project: PDFBox
>  Issue Type: Bug
>Reporter: Oliver Schmidtmer
>Priority: Major
>  Labels: shading
> Attachments: Plan zum Testen.pdf, image-2021-03-17-20-16-49-221.png
>
>
> The PDF contains many effectively very small shadings, the light cones. As 
> the gradient painting for each light cone is applied on the whole image, 
> rendering is very slow: 29 of 33 seconds are spent in shadingFill.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5134) Very slow rendering on PageDrawer.shadingFill

2021-03-18 Thread Oliver Schmidtmer (Jira)


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

Oliver Schmidtmer commented on PDFBOX-5134:
---

[https://github.com/apache/pdfbox/pull/109] and rendering is down to a few 
seconds in the PDFBox Debugger

> Very slow rendering on PageDrawer.shadingFill
> -
>
> Key: PDFBOX-5134
> URL: https://issues.apache.org/jira/browse/PDFBOX-5134
> Project: PDFBox
>  Issue Type: Bug
>Reporter: Oliver Schmidtmer
>Priority: Major
>  Labels: shading
> Attachments: Plan zum Testen.pdf, image-2021-03-17-20-16-49-221.png
>
>
> The PDF contains many effectively very small shadings, the light cones. As 
> the gradient painting for each light cone is applied on the whole image, 
> rendering is very slow: 29 of 33 seconds are spent in shadingFill.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5134) Very slow rendering on PageDrawer.shadingFill

2021-03-18 Thread Tilman Hausherr (Jira)


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

Tilman Hausherr commented on PDFBOX-5134:
-

I think what could be done is to calculate a bbox from the triangles if there 
isn't one, by reusing {{collectTriangles().}}

> Very slow rendering on PageDrawer.shadingFill
> -
>
> Key: PDFBOX-5134
> URL: https://issues.apache.org/jira/browse/PDFBOX-5134
> Project: PDFBox
>  Issue Type: Bug
>Reporter: Oliver Schmidtmer
>Priority: Major
>  Labels: shading
> Attachments: Plan zum Testen.pdf, image-2021-03-17-20-16-49-221.png
>
>
> The PDF contains many effectively very small shadings, the light cones. As 
> the gradient painting for each light cone is applied on the whole image, 
> rendering is very slow: 29 of 33 seconds are spent in shadingFill.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5134) Very slow rendering on PageDrawer.shadingFill

2021-03-17 Thread Oliver Schmidtmer (Jira)


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

Oliver Schmidtmer commented on PDFBOX-5134:
---

That is correct, the slow painting is Java itself. However, the clipping area 
is null and the paint applied to the whole image while those shades are 
PDTriangleBasedShadingTypes which only cover a very small area.

For example with the device bounds [x=0,y=0,width=4031,height=2024] a bounding 
rectangle, calculated in GouraudShadingContext.setTriangleList, around the 
triangles for shading COSName\{Sh0} is only 
[x=2916.300048828125,y=897.4940185546875,w=16.97998046875,h=17.0400390625]
 Applying a Paint to such a small area should be much faster. I probably need 
more time to look into how to calculate that beforehand and setting the 
clipping area.

 

> Very slow rendering on PageDrawer.shadingFill
> -
>
> Key: PDFBOX-5134
> URL: https://issues.apache.org/jira/browse/PDFBOX-5134
> Project: PDFBox
>  Issue Type: Bug
>Reporter: Oliver Schmidtmer
>Priority: Major
>  Labels: shading
> Attachments: Plan zum Testen.pdf, image-2021-03-17-20-16-49-221.png
>
>
> The PDF contains many effectively very small shadings, the light cones. As 
> the gradient painting for each light cone is applied on the whole image, 
> rendering is very slow: 29 of 33 seconds are spent in shadingFill.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5134) Very slow rendering on PageDrawer.shadingFill

2021-03-17 Thread Tilman Hausherr (Jira)


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

Tilman Hausherr commented on PDFBOX-5134:
-

I started the profiler and yes, the shadingFill takes the time, but then it's 
java itself?!

> Very slow rendering on PageDrawer.shadingFill
> -
>
> Key: PDFBOX-5134
> URL: https://issues.apache.org/jira/browse/PDFBOX-5134
> Project: PDFBox
>  Issue Type: Bug
>Reporter: Oliver Schmidtmer
>Priority: Major
>  Labels: shading
> Attachments: Plan zum Testen.pdf, image-2021-03-17-20-16-49-221.png
>
>
> The PDF contains many effectively very small shadings, the light cones. As 
> the gradient painting for each light cone is applied on the whole image, 
> rendering is very slow: 29 of 33 seconds are spent in shadingFill.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org