Fop
  1. Fop
  2. FOP-2057

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

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: trunk
    • Fix Version/s: None
    • Component/s: fonts
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: PC
    • External issue ID:
      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.

      1. test.zip
        947 kB
        Tassos

        Activity

        Hide
        Tassos added a comment -

        Thank your for applying the patch. This resolves the issue.

        Show
        Tassos added a comment - Thank your for applying the patch. This resolves the issue.
        Hide
        Glenn Adams added a comment -

        patch applied at http://svn.apache.org/viewvc?rev=1330317&view=rev

        please let me know if this resolves the problem

        Show
        Glenn Adams added a comment - patch applied at http://svn.apache.org/viewvc?rev=1330317&view=rev please let me know if this resolves the problem
        Hide
        Tassos added a comment -

        Attachment test.zip has been added with description: patch Patch for class o.a.f.fonts.type1.AFMParser that improves performance & java source files that points the issue.

        Show
        Tassos added a comment - Attachment test.zip has been added with description: patch Patch for class o.a.f.fonts.type1.AFMParser that improves performance & java source files that points the issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development