Well, it's "normal," but not necessarily desirable.
"save-facts" calls Rete.ppFacts() which actually just renders the fact
list as a big string. This is obviously not good. It's slow, and as
you note, consumes a lot of memory. Works fine for short fact lists,
though.
I will consider improving matters in the next release. For now, you
could write your own version save-facts. All you have to do is call
Rete.listFacts() to get an Enumeration of all facts, then simply write
the return value of toString() from each element of the Enumeration to
a file individually.
I think Gyhra, Norman (Student Assistant) wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Hello !
>
>
> Is it "normal" that (save-facts) seems to
> consume a huge amount of memory ?
>
> I use the NT task manager to watch the memory usage
> of my Jess program. It remains quite stable during the
> processing of rules. I tested with a 10 meg fact file
> that consumes about 50 megs of memory.
>
> However, as soons as I write my fact base into a
> file the usage jumps up to twice the value.
>
> As I want to use much larger fact bases later on,
> this behaviour might cause some serious memory problems.
>
> Any way to get around that?
> Thanks for any help.
>
> Jess 5.1
> Java 1.3
> P3-450
> 512 MB RAM
>
> Regards,
> Norman
>
> ---------------------------------------------------------------------
> 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]
> ---------------------------------------------------------------------
>
---------------------------------------------------------
Ernest Friedman-Hill
Distributed Systems Research Phone: (925) 294-2154
Sandia National Labs FAX: (925) 294-2234
Org. 8920, MS 9012 [EMAIL PROTECTED]
PO Box 969 http://herzberg.ca.sandia.gov
Livermore, CA 94550
---------------------------------------------------------------------
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]
---------------------------------------------------------------------