Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-235

Remove some inefficient exception handling

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • 3.0-rc3
    • None
    • drools-compiler
    • None

    Description

      Reported by Greg Barton in Drools 2.x:
      http://jira.codehaus.org/browse/DROOLS-487

      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.

      Attachments

        Activity

          People

            michaelneale_jira Michael Neale (Inactive)
            mproctor@redhat.com Mark Proctor
            Archiver:
            rhn-support-ceverson Clark Everson

            Dates

              Created:
              Updated:
              Resolved:
              Archived:

              PagerDuty