Hi Norman,
t
Well, first remember that asserting facts into the Rete network is
when all the pattern-matching gets done -- i.e., it's the most
computationally intensive part of a Jess application. First you need
to determine where the bottleneck actually is. If you have a profiling
tool available (I like OptimizeIt!, but it's payware) use it and see
what is slow. I would be -extremely- surprised if it were I/O code;
it's most likely pattern-matching tests.

Some possibilities: 

- Give Java more memory -- i.e., use the -Xmx128M -Xms128M
switches. The Java heap has a fixed maximum size; the smaller it is
the more time Java will spend garbage-collecting.

- Use the HotSpot Server VM, not the Client VM. The Client VM is
optimized for fast startup and GUI operations, not for computational
stuff. I find that there's a significant (30%) difference in some
cases, no differece in others.

- Look at your rules. If your rules can be redesigned to create fewer
partial matches, then fact-loading will go faster. This is probably
the biggest opportunity to optimize things. 

- Use literal tests rather than function calls when possible -- i.e.,
use

 (foo ?X&~bar)

rather than 

 (foo ?X&:(neq ?X bar))

This can be a polynomial speedup because it allows Jess to optimize
how Rete memories are indexed.

- Use Jess 6, not Jess 5. There are some notable performance
optimizations, especially if you're using much multifield pattern
matching. 

One final note: 300M of facts as text will parse into at least 300M of
data structures, not even counting the Tokens and Rete memories to
hold them, and probably twice that. This is an enormous problem you're
working on here!

I think Gyhra, Norman (Student Assistant) wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Hello!
> 
> I process "large" files with (load-facts)
> and there are some major issues regarding the
> performance.
> 
> Jess 5.0/5.1
> JDK 1.3
> Windows NT 4.0
> Pentium III 450
> 512 MB RAM
> 
> A 770kB file takes 35 seconds.
> It takes ages to load files with several MB.
> My files are going to have 300 MB and more !
> 
> Are there any faster possibilities ?
> 
> Thanks for any help!
> 
> Regards,
> Norman Gyhra
> 


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

Reply via email to