If I read this right, you are thinking of "caching" a shadow fact's properties in some sort of second order fact.
Consider: Jess evaluates facts whenever they are entered into the WM, or, partially, whenever a slot is changed. Calling some getter of a POJO shouldn't be expensive. Creating a "cache" fact requires the creation of another object, and then *this* fact will have to be entered into the rete for the existing rules. It's obvious that the rules would be more complicated, and that you'll need additional rules. Finally, the kind of data you're asking for is highly system dependent. Mail me your machine, and I'll tell you ;-) Cheers, Wolfgang On Thu, Nov 13, 2008 at 10:51 AM, Joao Antunes Mourao < [EMAIL PROTECTED]> wrote: > Hello, > > I'm developing a program in jess, which use quite a lot of accesses to > shadow facts, directly. I would like to know if I gain (an important > amount of computation time) if i keep the results in a working memory fact. > I mean, lets say i have a function in java that give me the color of a > car, and i need to test several times the color of the car. From jess, > should i use directly the java function (from the shadow fact) > or should i use only once, saving the result in a fact, and then use the > fact? Do I gain anything (in computation time)? Can you tell me how > different (in terms of performance) is an access from java and from a > jess fact? > > Regards, > > Joao > > ---------------- > unclassified email > > > > > > > > ------------------------------------------------------------------------------------------------------------ > Disclaimer: > > If you are not the intended recipient of this email, please notify the > sender and delete it. > Any unauthorized copying, disclosure or distribution of this email or its > attachment(s) is forbidden. > Thales Nederland BV will not accept liability for any damage caused by this > email or its attachment(s). > Thales Nederland BV is seated in Hengelo and is registered at the Chamber > of Commerce under number 06061578. > > ------------------------------------------------------------------------------------------------------------ > >
