Hi!
> I use several deftemplates including
> inheritance and all the loaded facts are
> unordered facts. May this be a problem ?
Inheritance is definetely not the problem when asserting facts. When
defining a child deftemplate the parent deftemplate's slot definitions are copied to
the child. When asserting an unordered fact the parent is not considered.
My guess would be that asserting an unordered fact, whether or not its
deftemplate inherited from a parent deftemplate, should be at least part of the
problem here. Look at the Fact class. Setting a single slot value has a runtime
complexity of O(s) (an average of s/2 steps), where s is the number of
slots. This is because a slot index has to be looked up in an unsorted linear list
of slots. Setting all slot values then requires s^2 / 2 steps, which is
O(s^2).
Thomas
P.S.: I don't have access to the Java code right now. This is what I
remember from a discussion I've had with Ernest some time ago. We discussed using
some sort of associative memory (e.g., a Hashtable) instead of a linear list.
Ernest thought that this might introduce to much of an overhead for average
deftemplates.
--
Sent through GMX FreeMail - http://www.gmx.net
---------------------------------------------------------------------
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]
---------------------------------------------------------------------