Re: performance problems

"David Young" <[email protected]> Fri, 31 Mar 2006 11:09:57 -0500
Newsgroups gmane.lisp.lisa.general
Message-ID <[email protected]>
------=_Part_5493_10736266.1143821397334
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Ok, after profiling and looking at Lisa's rete code (it's been a *long*
time), I think in this case Paolo's analysis is correct. After evaluating
(TEST 40), Lisa's rete network looks like this:

#<NODE1 #<closure (SUBFUNCTION 1 MAKE-CLASS-TEST) 21CFC9B2> ; 3 21D98BBC>
   #<NODE2 left 40 ; right 40 ; tests 0 21D98CAC>
      #<NODE2 left 1600 ; right 40 ; tests 0 21D99054>
         #<TERMINAL-NODE INITIAL-CONTEXT.RULE-1>
   #<NODE2 left 40 ; right 40 ; tests 0 21D98CAC>
      #<NODE2 left 1600 ; right 40 ; tests 0 21D99054>
         #<TERMINAL-NODE INITIAL-CONTEXT.RULE-1>
   #<NODE2 left 1600 ; right 40 ; tests 0 21D99054>
      #<TERMINAL-NODE INITIAL-CONTEXT.RULE-1>

at some places in the join network, asserting the 41st fact will require a
*huge* number of tests, none of which, of course, will short-circuit the
assertion process. In this particular test case, Lisa performs very poorly
because, as Paolo said, the rule is too general. KnowledgeWorks performs
much better, but even in that case the difference between (TEST 10) and
(TEST 40) is substantial.

That's how I see things at this point.

-- david

--
For wisdom is more precious than rubies,
and nothing you desire can compare with her.
  -- Proverbs 8:11

But all the world understands my language.
  -- Franz Joseph Haydn (1732-1809)

------=_Part_5493_10736266.1143821397334
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<div>Ok, after profiling and&nbsp;looking at Lisa's rete code (it's been a =
*long* time), I think in this case Paolo's analysis is correct. After evalu=
ating (TEST 40), Lisa's rete network looks like this:</div>
<div>&nbsp;</div>
<div>#&lt;NODE1 #&lt;closure (SUBFUNCTION 1 MAKE-CLASS-TEST) 21CFC9B2&gt; ;=
 3 21D98BBC&gt;<br>&nbsp;&nbsp; #&lt;NODE2 left 40 ; right 40 ; tests 0 21D=
98CAC&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&lt;NODE2 left 1600 ; right 40=
 ; tests 0 21D99054&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
 #&lt;TERMINAL-NODE=20
INITIAL-CONTEXT.RULE-1&gt;<br>&nbsp;&nbsp; #&lt;NODE2 left 40 ; right 40 ; =
tests 0 21D98CAC&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&lt;NODE2 left 1600=
 ; right 40 ; tests 0 21D99054&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp; #&lt;TERMINAL-NODE INITIAL-CONTEXT.RULE-1&gt;<br>&nbsp;&nbsp; #=
&lt;NODE2 left 1600 ; right 40 ; tests 0 21D99054&gt;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&lt;TERMINAL-NODE INITIAL-CONTEXT.RULE-=
1&gt;</div>
<div>&nbsp;</div>
<div>at some places in the join network, asserting the 41st fact will requi=
re&nbsp;a *huge* number of tests, none of which, of course, will short-circ=
uit the assertion process. In this particular test case, Lisa performs very=
 poorly because, as Paolo said, the rule is too general. KnowledgeWorks per=
forms much better,&nbsp;but&nbsp;even in that case the difference between (=
TEST 10) and (TEST 40) is substantial.
</div>
<div>&nbsp;</div>
<div>That's how I see things at this point.</div>
<div>&nbsp;</div>
<div>-- david&nbsp;<br clear=3D"all"><br>-- <br>For wisdom is more precious=
 than rubies,<br>and nothing you desire can compare with her.<br>&nbsp;&nbs=
p;-- Proverbs 8:11<br><br>But all the world understands my language.<br>&nb=
sp;&nbsp;-- Franz Joseph Haydn (1732-1809)=20
</div>

------=_Part_5493_10736266.1143821397334--


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642