On Feb 5, 2009, at 3:57 PM, Senlin Liang wrote:

Dear all,

I am loading a lot of facts using "(load-facts data-filename)". Is
this the most efficient way to load a huge number of facts in Jess?



It depends. If the data is already in the form of Jess facts, then you're not going to do any better by reading the file any other way. But if you've got data in a database or something, then you could avoid the overhead of reading and parsing the file by creating jess.Fact objects yourself in Java and asserting them directly. But that's just going to save the I/O and parsing overhead. If you're asserting these facts into a Rete network with a quadratic dependency on the number of facts, then it won't be worth the effort -- the time saved on I/O won't make much of a difference.


---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences          Phone: (925) 294-2154
Sandia National Labs
PO Box 969, MS 9012                            [email protected]
Livermore, CA 94550                             http://www.jessrules.com





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