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

Accumulate should be implemented with left-input incremental so they don't start from scratch on every left-input retraction/assertion

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
    • 6.0.0.Alpha1
    • 5.0.1.FINAL
    • drools-core (expert)
    • None

    Description

      The current accumulate implementation has a severe performance loss in the drools-solver context.
      Edson said that this issue could be the culprit.
      However, for this to be implemented the true modify feature should first be implemented.

      See the discussion "Why is this DRL twice as slow?" on the dev user list.
      From IRC:

      <ge0ffrey> more and more of my experiments show the poisones nature of accumulate for drools-solver. Probably because they are backwards chained (as I understand it?). Of course accummulate is great for many use cases, just not drools-solver.
      <ge0ffrey> The problem is, I have no way to workaround them. I need the sum of my logically inserted objects.
      <etirelli> ge0ffrey: no, accumulate are implemented as forward chain as usual
      <etirelli> the problem is that a left-input retraction on an accumulate node will throw away any result and a leftinput assert will recalculate everything from scratch
      <ge0ffrey> What do you mean by "must fully recalculate"?
      <etirelli> mean from scratch
      <ge0ffrey> Why does it do that?
      <etirelli> remember that modify = retract+assert
      <ge0ffrey> And right-input retractions won't recalculate everything from scratch?
      <etirelli> no... right input are incremental
      <ge0ffrey> would making leftinput assert incremental too be possible?
      <etirelli> ge0ffrey: the only way to do left-input incremental is with a feature called "true modify"

      Attachments

        Issue Links

          Activity

            People

              etirelli@redhat.com Edson Tirelli
              gdesmet@redhat.com Geoffrey De Smet (Inactive)
              Archiver:
              rhn-support-ceverson Clark Everson

              Dates

                Created:
                Updated:
                Resolved:
                Archived:

                PagerDuty