Re: [tkined] scotty slowness with tcl 8.0

Juergen Schoenwaelder (schoenw@ibr.cs.tu-bs.de)
Mon, 4 Oct 1999 17:09:36 +0200

>>>>> Arun Kumar writes:

Arun> We were using scotty 2.1.05 with tcl7.6 for our tools. Now
Arun> we upgraded to tcl 8.0.5 and scotty to 2.1.10. We are seeing
Arun> performance problems with the new combination (tcl8.0.5 and
Arun> scotty 2.1.10).

[...]

It really depends on what your Tcl code looks like. Callbacks for
asynchronous SNMP operations for example slow down Tcl as they are
recompiled whenever you hit them. Of course, recompiling them every
time is much more expensive than not compiling them at all (which is
what 7.6 does).

The scotty code did actually not change much (except bug fixes)
between 2.1.5 and 2.1.10. So what you see is the impact of the Tcl
compiler.

If the callback are your problem, then try to make them as small as
possible. That is, instead

$s get $vbl {
# lots of fancy stuff here
}

write

proc fancy {args} {
# lots of fancy stuff here
}

$s get $vbl [list fancy ... ]

There may be other reasons for the performance degration you see (and
other workarounds as well). Anyway, the real problem here are
callbacks and their substitutions (e.g. %V). Substitutions are also
problematic in itself as you can easily make quoting errors -- and
this can even have security implications. So my conclusion is that
the substitutions should be replaced by a better mechanism which
(a) is compiler friendly and (b) solves nasty quoting problems.

(The idea of using substitutions in the first place was borrowed from
Tk and it turns out that it was a bad idea. Thats life.)

/js

-- 
Juergen Schoenwaelder      Technical University Braunschweig
<schoenw@ibr.cs.tu-bs.de>  Dept. Operating Systems & Computer Networks
Phone: +49 531 391 3289    Bueltenweg 74/75, 38106 Braunschweig, Germany
Fax:   +49 531 391 5936    <URL:http://www.ibr.cs.tu-bs.de/~schoenw/>

--
!! This message is brought to you via the `tkined & scotty' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>.
!! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.