[
https://issues.apache.org/jira/browse/BATIK-897?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Vincent Hennebert resolved BATIK-897.
-------------------------------------
Resolution: Fixed
Fixed in rev. [1614076|http://svn.apache.org/r1614076].
Thanks for your patch!
Vincent
> [PATCH] CSS scanner keeps multiple file handles to UserAgentStyleSheet.css
> open
> -------------------------------------------------------------------------------
>
> Key: BATIK-897
> URL: https://issues.apache.org/jira/browse/BATIK-897
> Project: Batik
> Issue Type: Bug
> Components: CSS
> Affects Versions: 1.7
> Environment: Operating System: All
> Platform: All
> Reporter: Martin Kaeser
> Assignee: Batik Developer's Mailing list
> Labels: PatchAvailable
> Attachments: batik-css-patch.zip
>
>
> Our software uses the CSS component of Batik. It's executed on a dedicated
> server system. Several times a big number of file handles (> 100) to the
> Batik resource file UserAgentStyleSheet.css remained open, that forced us to
> restart the server.
> We managed to track down the problem in the Batik source code:
> In SVGDOMImplementation and SVG12DOMImplementation the above mentioned
> resource file is parsed, which leads to
> org.apache.batik.css.parser.Parser.parseStyleSheet(InputSource source). At
> the beginning of this method a Scanner instance is created but at the end it
> isn't destroyed (only set to null). The org.apache.batik.css.parser.Scanner
> holds an instance of org.apache.batik.util.io.NormalizingReader that needs to
> be closed to free the file handle.
> As the scanner and the reader are not destroyed after the end of their usage,
> the freeing of the file handle relies on the Java garbage collector.
> Especially on server systems with lots of resources this can take a long time.
> To improve the performance in this respect we applied a patch to our version
> of Batik (based on batik-src-1.7.zip). With this post we send you unifed diff
> files for Parser.java and Scanner.java. We would really appreciate it if you
> could include a fix for this matter in the next version of Batik.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]