I think Ryan Crumley wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> The one engine per user per session has been fixed, and now we use
> one engine per thread. This helped performance a lot. However now it
> looks like we need a bit more.
> I believe our ruleset can be modified to use one engine overall
> using some sort of session identifier on the facts, however my worry
> is that would create one big bottleneck. Does this offer any
> performance gains besides only needing to parse and construct the
> network once? I dont think creating the network once per thread is
> causing us many performance problems. I am trying to establish if
> this change is worth persuing or if there are other areas of the
> rules that could use attention.
>From your earlier description of your application, probably not. It
would help if you had a large body of facts that didn't change when
the user changed -- i.e., product data or something like that. I think
you said there were only a small number of facts in total, so this
change wouldn't make much difference.
As with other performance situations, the best thing to do is to try
to profile the application. This can be tough with Web apps, although
there are certainly tools that can do it. The results would give you
an idea of where to concentrate your efforts.
If this isn't feasible, then you have to feel your way around some
other way. You can certainly try using Jess's "match" and "view"
commands to see what you can learn about pattern-matching behavior,
and whether changes to rule LHSs could help.
If you're making heavy use of multislots, especially ones with lots of
values in them, trying to eliminate or shorten them can help. This
goes for ordered facts, too -- unordered facts like
(person (name Bob) (age 37) (shoe-size 10))
will lead to a much more efficient system than
(person Bob 37 10)
---------------------------------------------------------
Ernest Friedman-Hill
Distributed Systems Research Phone: (925) 294-2154
Sandia National Labs FAX: (925) 294-2234
PO Box 969, MS 9012 [EMAIL PROTECTED]
Livermore, CA 94550 http://herzberg.ca.sandia.gov
--------------------------------------------------------------------
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]
--------------------------------------------------------------------