Uploaded image for project: 'FOP'
  1. FOP
  2. FOP-1890

O(n^2) code for adding new pages

    Details

    • Type: Improvement
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: trunk
    • Fix Version/s: None
    • Component/s: fo/unqualified
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All
    • External issue ID:
      50636

      Description

      Adding a new page causes to iterate over all existing page sequnces and count their number of pages.

      If there is a large number of page sequences, this can take a significant percentage of the fop running time.

      I have the attached workaround in my tree for some time:
      It caches the number of pages in the page sequences, so that adding a new page is only O(1).

        Attachments

          Activity

            People

            • Assignee:
              fop-dev@xmlgraphics.apache.org fop-dev
              Reporter:
              e9925248 Martin Koegler
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: