Re: Tcl bytecode



Cameron Laird wrote:
In article <45bf79b0$0$8725$ed2619ec@xxxxxxxxxxxxxxxxxxxxxxxxxx>,
Keith Nash <kjn9@xxxxxxxxxxxxxxxx> wrote:
.
.
.
Some large Tcl apps are slow to start: is this because too many procs are
executed in the startup script?
.
.
.
Typically it's because they're doing a lot of work (unavoidable,
real, ..., in some sense), OR because there's complex resolution
of package lookup. If a remote-mounted directory that's hard to
search happens to be in the path for package resolution, and there
are many packages to look up ...

It doesn't matter how many packages there are to look up. Even if you
go looking for only one, [tclPkgUnknown] crawls all over trying to
discover every package it can find.

What matters is the number of directories in the value of $::auto_path,
the number of subdirectories in those directories, and the access speed
to the storage those directory pathnames represent.

Typical slow configurations have /usr/lib on $::auto_path, with
[llength [glob /usr/lib/*]] very large, and with storage at the other
end of a (possibly several... automounted?) network connection(s).

In Tcl 8.5, this can be better if the package you go looking for is
installed in Tcl Module form.

--
| Don Porter Mathematical and Computational Sciences Division |
| donald.porter@xxxxxxxx Information Technology Laboratory |
| http://math.nist.gov/~DPorter/ NIST |
|______________________________________________________________________|
.



Relevant Pages

  • Re: Tcl bytecode
    ... Keith Nash wrote: ... executed in the startup script? ... real, ..., in some sense), OR because there's complex resolution ... search happens to be in the path for package resolution, ...
    (comp.lang.tcl)
  • Trying to get started with sdx...
    ... This afternoon I downloaded tclkit and sdx from equi4.com. ... ("package ifneeded" script) ... Anyway my app is structured like: ... Main-Dir contains a startup script Foo.tcl ...
    (comp.lang.tcl)
  • Re: Finding a TCL module
    ... Error in startup script: can't find package Archer 1.0 ... while executing ...
    (comp.lang.tcl)
  • Re: Finding a TCL module
    ... Error in startup script: can't find package Archer 1.0 ... while executing ...
    (comp.lang.tcl)
  • Re: Finding a TCL module
    ... Error in startup script: can't find package Archer 1.0 ... while executing ...
    (comp.lang.tcl)