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

[PATCH] Fop Performance degradation after upgrading from jdk 6 u18 to u19

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Resolution: Fixed
    • 2.5
    • None
    • font/unqualified
    • None
    • Operating System: All
      Platform: PC
    • 53148

    Description

      Using Apache FOP 1.0 to create Postscript documents from xml files after upgrading the Java Virtual Machine from 1.6 update 18 to 1.6 update 19, important performance degradation was observed. The FOP execution time was increased about 25% - 35%. After investigating this, we concluded that the code that was responsible for this delay was in the method setValue of inner class BeanSetter of class o.a.f.fonts.type1.AFMParser. This method uses reflection to set the value of a bean and our tests showed that the time to execute a reflection call like this was increased in jdk6 u19.
      In the attached files may be found a patch for class o.a.f.fonts.type1.AFMParser that improves performance. Also the attachment contains a Java file with a minimal fo and configuration that shows the issue. It contains a main class where fop converts the fo file to postscript 500 times.

      Below may be found the execution times for the provided test using the mentioned versions of Java (Windows 7 x64).

      Java 6 update 18 it takes 30754 msec.
      Java 6 update 19 it takes 54263 msec.

      After applying the patch:

      Java 6 update 18 it takes 34240 msec.
      Java 6 update 19 it takes 32501 msec.

      The svn revision from which the patch was created is revision #1330050 from trunk.

      Attachments

        1. test.zip
          947 kB
          Tassos

        Activity

          People

            fop-dev@xmlgraphics.apache.org fop-dev
            tcharoulis@gmail.com Tassos
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: