To single out the rule(s) that consume more time than usual or tolerable,
you might try the procedure outlined below.

I'm assuming that you now have a sequence of actions like this:
(1) deftemplate's
(2) defrule's
(3) (reset)
(4) assert of the facts

Rearrange this so that the facts are asserted *before* defining any rules.
Time each rule by a simple function, e.g.

(deffunction clock (?text)
  (bind ?now (time))
  (printout  t ?text " completed after " (integer (- ?now ?t)) crlf)
  (bind ?t ?now)
)

(bind ?t (time))
...assert facts
(clock "assertions")
... 1st rule
(clock "1st rule")
... 2nd rule
(clock "2nd rule")
... etc.

On Mon, Nov 17, 2008 at 9:53 AM, Jessica Kampmann
<[EMAIL PROTECTED]>wrote:

> Dear all,
>
> i have performance problems asserting 11000 Facts in a for loop.
> I am using engine.assert(fact) and it takes much longer than very thing
> else.
>
> Regards Jessica
>
>
> --
> Freundliche Grüße / Kind regards
>
> Jessica Kampmann
>
> Software-Entwicklung
>
> Tel.: +49 40 398053 51
> Fax: +49 40 398053 53
> Mobil: +49 163 8288 730
>
> mailto:[EMAIL PROTECTED]
>
> http://www.ikor.de
>
> IKOR Products GmbH
> Ottenser Hauptstraße 56 ° 22765 Hamburg
>
> Geschäftsführer: Dieter Weiss
>
> Handelsregister Hamburg HRB 78406
>
>
>
> --------------------------------------------------------------------
> To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
> in the BODY of a message to [EMAIL PROTECTED], NOT to the list
> (use your own address!) List problems? Notify [EMAIL PROTECTED]

Reply via email to