Thanks Wolfgang. My question was only about the access and processing
time of functions in Java, compared with the facts in working memory,
i.e. how much time takes for jess to "connect" with Java, and how much i
can get for decrease the number of accesses to Java, creating the cache
facts. From what i understood this switch between jess and Java is very
fast, so is preferred to use the Java functions, than create shadow facts.

Thanks again,

Joao Mourao


On 13-11-2008 19:27, Wolfgang Laun wrote:
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]
<mailto:[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.
    
------------------------------------------------------------------------------------------------------------




------------------------------------------------------------------------------------------------------------
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.
------------------------------------------------------------------------------------------------------------

begin:vcard
fn;quoted-printable:Jo=C3=A3o Mour=C3=A3o
n;quoted-printable;quoted-printable:Mour=C3=A3o;Jo=C3=A3o
org:Thales;Above Water Systems
adr:;;;Hengelo;;;Netherlands
email;internet:[EMAIL PROTECTED]
title:THALES NETHERLANDS B.V.
tel;work:2640
note:-unclassified mail-
version:2.1
end:vcard

Reply via email to