[ http://jira.codehaus.org/browse/DROOLS-487?page=comments#action_61510 ]
Michael Neale commented on DROOLS-487: -------------------------------------- yes that could be better, checking for null streams. The impact on this would be minimal, as most of the time it will work with the first try, also its a one off loading cost. Finally, this piece of code has been retired from Drools 3, and has been sent out the pasture (or perhaps the shed, and then shot in the head). No you can't visit it. > Remove some inefficient exception handling > ------------------------------------------- > > Key: DROOLS-487 > URL: http://jira.codehaus.org/browse/DROOLS-487 > Project: drools > Type: Improvement > Components: io > Versions: 2.5 > Reporter: Greg Barton > Priority: Minor > Fix For: 2.5 > Attachments: patch.txt > > > Using exceptions for flow control can be very inefficient on most modern VMs. > This is because exception handling is rarely optimized. Thus it is highly > preferable to use conditionals to test for exceptional conditions and avoid > them instead of using a try/catch to knowingly trigger them. > I saw some code in org.drools.io.RuleSetReader.resolveSchema() that tested > various locations for the xsd file using exceptions for flow control. > Attached is a patch that eliminates that with identical functionality. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
