You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by bu...@apache.org on 2009/03/20 11:04:35 UTC

DO NOT REPLY [Bug 46883] New: AFP/GOCA: Performance Hot Spot in AbstractGraphicsDrawingOrderContainer.getDataLength()

https://issues.apache.org/bugzilla/show_bug.cgi?id=46883

           Summary: AFP/GOCA: Performance Hot Spot in
                    AbstractGraphicsDrawingOrderContainer.getDataLength()
           Product: Fop
           Version: 1.0dev
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: images
        AssignedTo: fop-dev@xmlgraphics.apache.org
        ReportedBy: jeremias@apache.org


I've just stumbled over a serious performance hotspot in the GOCA part when
rendering a DataMatrix barcode using Barcode4J. I haven't had time, yet, to
investigate if other graphics also exhibit that. Here's some profiling data:

org.apache.fop.afp.goca.AbstractGraphicsDrawingOrderContainer.getDataLength()
Time: 277'609ms (51%)
Own Time: 100'437ms (18%)
Invocation Count: 178'560

GraphicsBox.getDataLength() also seems to be involved here.

Just noting this mostly for myself (to revisit later).

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 46883] AFP/GOCA: Performance Hot Spot in AbstractGraphicsDrawingOrderContainer.getDataLength()

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46883

Glenn Adams <gl...@skynav.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P3

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 46883] AFP/GOCA: Performance Hot Spot in AbstractGraphicsDrawingOrderContainer.getDataLength()

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46883





--- Comment #2 from Andreas L. Delmelle <ad...@apache.org>  2009-07-12 09:42:41 PST ---
Note:
Just thought of another way to go about it. Define the dataLength member, and
simply update it upon every add() or remove() operation. It will make those
operations just a tiny bit slower, but at least it also avoids having to
iterate over the entire collection to determine the data length.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 46883] AFP/GOCA: Performance Hot Spot in AbstractGraphicsDrawingOrderContainer.getDataLength()

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46883


Andreas L. Delmelle <ad...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #23958|0                           |1
        is obsolete|                            |


--- Comment #3 from Andreas L. Delmelle <ad...@apache.org> 2009-08-19 11:53:54 PDT ---
Created an attachment (id=24151)
Revised patch

Patch in attach attempts at resolving the time spent in the mentioned method by
adding dataLength as a member, and increasing/decreasing it with every add or
remove operation.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 46883] AFP/GOCA: Performance Hot Spot in AbstractGraphicsDrawingOrderContainer.getDataLength()

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46883


Andreas L. Delmelle <ad...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


--- Comment #4 from Andreas L. Delmelle <ad...@apache.org> 2009-08-23 12:59:41 PDT ---
Patch applied with rev807010.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 46883] AFP/GOCA: Performance Hot Spot in AbstractGraphicsDrawingOrderContainer.getDataLength()

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46883

Jeremias Maerki <je...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |

--- Comment #5 from Jeremias Maerki <je...@apache.org> 2009-09-28 07:14:41 PDT ---
I had to revert revision 807010 because it caused a regression. Even very
simple SVGs (for example [1]) converted to GOCA caused faulty documents. Due to
time pressure, I'm afraid I cannot currently invest more time than I already
have on fixing this, so I'm just reverting the change and reopening the bug.
Sorry.

http://svn.apache.org/viewvc?rev=819542&view=rev

[1]
http://svn.apache.org/repos/asf/xmlgraphics/fop/trunk/test/resources/images/img-w-size.svg

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 46883] AFP/GOCA: Performance Hot Spot in AbstractGraphicsDrawingOrderContainer.getDataLength()

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46883





--- Comment #1 from Andreas L. Delmelle <ad...@apache.org>  2009-07-10 12:42:58 PST ---
Created an attachment (id=23958)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23958)
possible fix

Quickly looking at the method in question shows one way of reducing the
performance hit: instead of iterating over the collection every time, keep a
cached dataLength member, and return that. Haven't tested whether the
synchronization overhead outweighs going over the collection repeatedly,
though...

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 46883] AFP/GOCA: Performance Hot Spot in AbstractGraphicsDrawingOrderContainer.getDataLength()

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46883

--- Comment #6 from Glenn Adams <gl...@skynav.com> 2012-04-07 01:43:03 UTC ---
resetting P2 open bugs to P3 pending further review

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 46883] AFP/GOCA: Performance Hot Spot in AbstractGraphicsDrawingOrderContainer.getDataLength()

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46883

Glenn Adams <gl...@skynav.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|1.1dev                      |0.95
           Severity|normal                      |enhancement

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.