Details

    • Type: Bug Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: None
    • Component/s: general
    • Labels:
      None
    • Environment:
      Operating System: Linux
      Platform: PC
    • External issue ID:
      51808

      Description

      It is usual for Area::props to have 1-2 properties, not 20. From other point, 20 seems to be max cap. To prevent memory waste HashMap(20) should be replaced with TreeMap().

        Activity

        Hide
        Glenn Adams added a comment -

        analysis shows that 98% of trait maps contain 3 entries with remainder containing 1 entry; changing to tree map results in a 2% memory savings compared to overall usage by java.util.* classes at IFDocumentHandler.endPage() call time; time performance also improved (marginally) with tree map, so there are no negatives in making this change

        see http://svn.apache.org/viewvc?view=revision&revision=1310524

        Show
        Glenn Adams added a comment - analysis shows that 98% of trait maps contain 3 entries with remainder containing 1 entry; changing to tree map results in a 2% memory savings compared to overall usage by java.util.* classes at IFDocumentHandler.endPage() call time; time performance also improved (marginally) with tree map, so there are no negatives in making this change see http://svn.apache.org/viewvc?view=revision&revision=1310524
        Hide
        Glenn Adams added a comment -

        on further consideration, Sergey, if you could provide some data that shows relative gain/loss in heap use and processing time for an large FO file of 'typical' complexity when using the current code HashMap(20) versus TreeMap, then I would be inclined to make this change (assuming the data favors TreeMap);

        Show
        Glenn Adams added a comment - on further consideration, Sergey, if you could provide some data that shows relative gain/loss in heap use and processing time for an large FO file of 'typical' complexity when using the current code HashMap(20) versus TreeMap, then I would be inclined to make this change (assuming the data favors TreeMap);
        Hide
        Glenn Adams added a comment -

        feel free to propose a patch; in the mean time, closing due to lack of action

        Show
        Glenn Adams added a comment - feel free to propose a patch; in the mean time, closing due to lack of action

          People

          • Assignee:
            fop-dev
            Reporter:
            Sergey Vladimirov
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development