Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
2.5
-
None
-
None
-
-
46360
Description
FOP reuses/caches SVG documents to improve performance. But as we had to learn, this approach is not thread-safe as Batik attaches some facilities (like the CSS engine) to the DOM which are not thread-safe. The detailed discussion of the issue can be found here:
http://markmail.org/message/2dk2ib4e5t6vfsrl
The safest approach is to clone the SVG DOM prior to passing it to Batik.
Obviously that will cost a bit of performance and increase memory usage a bit. If we're careful and have the resources to implement that we can improve performance by caching Batik's GVT tree. Ideas can also be found in the thread indicated above.