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

Thread-safety issue rendering SVG

    Details

    • External issue ID:
      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.

        Attachments

          Activity

            People

            • Assignee:
              fop-dev@xmlgraphics.apache.org fop-dev
              Reporter:
              jeremias@apache.org Jeremias Maerki
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: