ICEpdf
  1. ICEpdf
  2. PDF-627

Core library is spending quite a bit of time garbage collecting

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.2
    • Fix Version/s: 5.0.3
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      any

      Description

      A few users have point at this but I thin I finally found the cause. When working though a large document there is an eventual slow down and there is a lot of time spent doing garbage collection. As a result of this collection the UI feels really slow.

      I kicked the tires a bit and found that the we are using Softreferences for just about everying, which make it hard for the garbage collector to know what to do.

        Activity

        Hide
        Patrick Corless added a comment -

        I updated the Library's ConcurrentHashMap for refs and lookupReference2ICCBased to use WeakReferences to give the GC a better hint of what can be pruned. As a result of this simple change the UI is buttery smooth while scrolling through a document with thousands of pages. The memory usage also seems to stay much further below the max memory.

        Show
        Patrick Corless added a comment - I updated the Library's ConcurrentHashMap for refs and lookupReference2ICCBased to use WeakReferences to give the GC a better hint of what can be pruned. As a result of this simple change the UI is buttery smooth while scrolling through a document with thousands of pages. The memory usage also seems to stay much further below the max memory.
        Hide
        Patrick Corless added a comment -

        Updated both the trunk and the 5.0.1 branch with the library changes

        Show
        Patrick Corless added a comment - Updated both the trunk and the 5.0.1 branch with the library changes

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Patrick Corless
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: