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

[PATCH] Excessive memory usage when using truetype collection (.ttc)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.0
    • None
    • None
    • None
    • At least Mac and Linux, both Oracle VM and OpenJDK

    Description

      When a TrueType Collection file is used to specify custom fonts, and a long-running FopFactory is used to create FOP instances to process many FO input documents, millions of org.apache.fop.complexscripts.fonts.GlyphPositioningTable$PairValues and org.apache.fop.complexscripts.fonts.GlyphPositioningTable$Values instances get created which are never collected. Thus the heap continues to grow, leading to eventual GC thrashing or crash.

      When the same fonts are used, but extracted from the TTC file, the issue does not occur, and the instances of those classes are collected normally.

      The issue can be seen by repeatedly processing a document with a config.xml which specifies fonts inside of a Truetype Collection file. Attaching VisualVM to such a process will show continuous heap growth and millions of aforementioned instances whose numbers never decrease.

      Attachments

        1. FOP-2525.patch
          3 kB
          Andreas L. Delmelle
        2. FOP_patch_heap-usage.png
          104 kB
          Lars J
        3. removestatic2.patch
          13 kB
          Simon Steiner

        Activity

          People

            ssteiner Simon Steiner
            jeremyrsmith Jeremy Smith
            Votes:
            13 Vote for this issue
            Watchers:
            19 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: