You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Adrian Nistor (JIRA)" <ji...@apache.org> on 2012/11/28 19:54:58 UTC

[jira] [Created] (PDFBOX-1458) wasted work in PDOptionalContentProperties.setGroupEnabled()

Adrian Nistor created PDFBOX-1458:
-------------------------------------

             Summary: wasted work in PDOptionalContentProperties.setGroupEnabled()
                 Key: PDFBOX-1458
                 URL: https://issues.apache.org/jira/browse/PDFBOX-1458
             Project: PDFBox
          Issue Type: Bug
    Affects Versions: 1.7.1
            Reporter: Adrian Nistor


The problem appears in version version 1.7.1 and in revision 1414788.
I attached a three-line patch (on.diff) that fixes it.

In method "PDOptionalContentProperties.setGroupEnabled", the loop over
"on" should not be executed if "enable" is "true".  When "enable" is
"true", all the iterations just compute "group" and "name", and then
discard them, because the "if" condition depends on "!enable".


Similarly, in the same method
"PDOptionalContentProperties.setGroupEnabled", the loop over "off"
should not be executed if "enable" is "false".  I attached a separate
patch (off.diff) for the "off" loop.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (PDFBOX-1458) wasted work in PDOptionalContentProperties.setGroupEnabled()

Posted by "Adrian Nistor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-1458?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Nistor updated PDFBOX-1458:
----------------------------------

    Description: 
The problem appears in version version 1.7.1 and in revision 1414788.
I attached a three-line patch (on.diff) that fixes it.  This problem
and the attached patch are similar the previously fixed PDFBOX-1447
and its patch.

In method "PDOptionalContentProperties.setGroupEnabled", the loop over
"on" should not be executed if "enable" is "true".  When "enable" is
"true", all the iterations just compute "group" and "name", and then
discard them, because the "if" condition depends on "!enable".


Similarly, in the same method
"PDOptionalContentProperties.setGroupEnabled", the loop over "off"
should not be executed if "enable" is "false".  I attached a separate
patch (off.diff) for the "off" loop.

  was:
The problem appears in version version 1.7.1 and in revision 1414788.
I attached a three-line patch (on.diff) that fixes it.

In method "PDOptionalContentProperties.setGroupEnabled", the loop over
"on" should not be executed if "enable" is "true".  When "enable" is
"true", all the iterations just compute "group" and "name", and then
discard them, because the "if" condition depends on "!enable".


Similarly, in the same method
"PDOptionalContentProperties.setGroupEnabled", the loop over "off"
should not be executed if "enable" is "false".  I attached a separate
patch (off.diff) for the "off" loop.

    
> wasted work in PDOptionalContentProperties.setGroupEnabled()
> ------------------------------------------------------------
>
>                 Key: PDFBOX-1458
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1458
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 1.7.1
>            Reporter: Adrian Nistor
>              Labels: patch, performance
>         Attachments: off.diff, on.diff
>
>
> The problem appears in version version 1.7.1 and in revision 1414788.
> I attached a three-line patch (on.diff) that fixes it.  This problem
> and the attached patch are similar the previously fixed PDFBOX-1447
> and its patch.
> In method "PDOptionalContentProperties.setGroupEnabled", the loop over
> "on" should not be executed if "enable" is "true".  When "enable" is
> "true", all the iterations just compute "group" and "name", and then
> discard them, because the "if" condition depends on "!enable".
> Similarly, in the same method
> "PDOptionalContentProperties.setGroupEnabled", the loop over "off"
> should not be executed if "enable" is "false".  I attached a separate
> patch (off.diff) for the "off" loop.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (PDFBOX-1458) wasted work in PDOptionalContentProperties.setGroupEnabled()

Posted by "Andreas Lehmkühler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-1458?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Lehmkühler resolved PDFBOX-1458.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.8.0
         Assignee: Andreas Lehmkühler

I applied a similar patch in revision 1415783 based on Adrians proposal.

Thanks for the contribution!
                
> wasted work in PDOptionalContentProperties.setGroupEnabled()
> ------------------------------------------------------------
>
>                 Key: PDFBOX-1458
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1458
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 1.7.1
>            Reporter: Adrian Nistor
>            Assignee: Andreas Lehmkühler
>              Labels: patch, performance
>             Fix For: 1.8.0
>
>         Attachments: off.diff, on.diff
>
>
> The problem appears in version version 1.7.1 and in revision 1414788.
> I attached a three-line patch (on.diff) that fixes it.  This problem
> and the attached patch are similar the previously fixed PDFBOX-1447
> and its patch.
> In method "PDOptionalContentProperties.setGroupEnabled", the loop over
> "on" should not be executed if "enable" is "true".  When "enable" is
> "true", all the iterations just compute "group" and "name", and then
> discard them, because the "if" condition depends on "!enable".
> Similarly, in the same method
> "PDOptionalContentProperties.setGroupEnabled", the loop over "off"
> should not be executed if "enable" is "false".  I attached a separate
> patch (off.diff) for the "off" loop.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (PDFBOX-1458) wasted work in PDOptionalContentProperties.setGroupEnabled()

Posted by "Adrian Nistor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-1458?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Nistor updated PDFBOX-1458:
----------------------------------

    Attachment: off.diff
                on.diff

patches
                
> wasted work in PDOptionalContentProperties.setGroupEnabled()
> ------------------------------------------------------------
>
>                 Key: PDFBOX-1458
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1458
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 1.7.1
>            Reporter: Adrian Nistor
>              Labels: patch, performance
>         Attachments: off.diff, on.diff
>
>
> The problem appears in version version 1.7.1 and in revision 1414788.
> I attached a three-line patch (on.diff) that fixes it.
> In method "PDOptionalContentProperties.setGroupEnabled", the loop over
> "on" should not be executed if "enable" is "true".  When "enable" is
> "true", all the iterations just compute "group" and "name", and then
> discard them, because the "if" condition depends on "!enable".
> Similarly, in the same method
> "PDOptionalContentProperties.setGroupEnabled", the loop over "off"
> should not be executed if "enable" is "false".  I attached a separate
> patch (off.diff) for the "off" loop.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira