Re: JESS: Size of an activation record
And even an addendum to this question: Is there (I read something 'akin' to this in the mailing archive) a big performance hit as well? I like to use beans/shadow facts for a variety of reasons, but have always been under the impression that when i'm going to assert a 'huge' number of a particular fact type, that I should be using a deftemplate/fact API versus just using defclass/definstance of a bean representing the exact same information. Thanks, Roger On 11/22/05, Scott Moss [EMAIL PROTECTED] wrote: It would be useful to me to extend this discussion a little-- specifically to the memory requirements of facts and shadow facts. Is there any way of know whether a shadow fact relating to a Java object with (say) all fields having getter and setter methods (the latter having property change support) uses more or less memory than a Fact with the same number and types of slots? The question is about relative rather than absolute memory usage. thanks. [EMAIL PROTECTED] wrote: I think Kristina Marasovic wrote: [Charset iso-8859-1 unsupported, filtering to ASCII...] Hi, can someone tell me if it is possible (and how) to get or to measure the size of an activation record. You don't really know the size of *any* Java object, as the details of object representation are implementation-dependent. Furthermore, it's rather tricky to determine the size of an object when that object is part of a dense interconnected web of objects like Jess's Rete network. That said, in the current implementation, an Activation object has 4 members, which at 4 bytes each is 16 bytes. Along with the generally-assumed Java memory overhead per object of 16 bytes, that means each Activation is 32 bytes. If you have 756,000 of them, that's 24 MB. If you include the 4 byte array element that holds each Activation, then that adds another 3 MB. Now, each Activation record has a reference to a Defrule (which would exist anyway) and a Token in the Rete network. If you want to start including those Tokens in the memory count, then it becomes very complicated very quickly, as many, many Tokens are shared, and also Token is a recursive data structure -- a Token usually contains a reference to another parent token. The depth of the recursion and the amount of sharing is entirely dependent on the nature of your rules. - Ernest Friedman-Hill Advanced Software 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] . -- Professor Scott Moss Director Centre for Policy Modelling Manchester Metropolitan University Aytoun Building Manchester M1 3GH http://cfpm.org/~scott (t) +44 (0)161 247 3886 (f) +44 (0)161 247 6802 (m) +44 (0)7740 942564 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]
Re: JESS: Template Hierarchy
I think Jeffrey Davine wrote: Perhaps the place to ask this question is the Constantine Planning Wiki - but would it be difficult in the next version of Jess to implement a hierarchical template structure? ... (deftemplate Individual extends LegalAgent OK, let's get in the time machine... going back... mucking with the space time continuum... writing a little code... OK, I'm back! Jess has had exactly the feature you describe, using your proposed syntax, since version 5.0a1. It works exactly as you describe. The code you've shown here ought to work perfectly. Thank you! - Ernest Friedman-Hill Advanced Software Research Phone: (925) 294-2154 Sandia National LabsFAX: (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]
Re: JESS: Size of an activation record
I think Roger Studner wrote: Is there (I read something 'akin' to this in the mailing archive) a big performance hit as well? I like to use beans/shadow facts for a variety of reasons, but have always been under the impression that when i'm going to assert a 'huge' number of a particular fact type, that I should be using a deftemplate/fact API versus just using defclass/definstance of a bean representing the exact same information. There *was* a performance issue in earlier versions of Jess 6 related to Fact slots containing Java objects (doesn't matter whether the Fact is a plan fact or a shadow fact.) The issue was that Jess didn't do the kind of efficient indexing of those slots that it can do with primitive types. That's been cleared up now. There's no performance penalty for using definstances. - Ernest Friedman-Hill Advanced Software Research Phone: (925) 294-2154 Sandia National LabsFAX: (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]
RE: JESS: Template Hierarchy
Opps - I'm now printing out the entire documentation! Thanks. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, November 22, 2005 9:13 AM To: jess-users@sandia.gov Subject: Re: JESS: Template Hierarchy I think Jeffrey Davine wrote: Perhaps the place to ask this question is the Constantine Planning Wiki - but would it be difficult in the next version of Jess to implement a hierarchical template structure? ... (deftemplate Individual extends LegalAgent OK, let's get in the time machine... going back... mucking with the space time continuum... writing a little code... OK, I'm back! Jess has had exactly the feature you describe, using your proposed syntax, since version 5.0a1. It works exactly as you describe. The code you've shown here ought to work perfectly. Thank you! - Ernest Friedman-Hill Advanced Software Research Phone: (925) 294-2154 Sandia National LabsFAX: (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] 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]