Affects Version/s: trunk
Fix Version/s: None
Environment:Operating System: All
External issue ID:53148
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.