[ltp] programs take much too long to start

Eben King linux-thinkpad@linux-thinkpad.org
Tue, 14 Dec 2004 13:36:03 -0500 (EST)


On Tue, 14 Dec 2004, André Wyrwa wrote:

> > What about /var/log/messages ?  Any hints there?  To me it sounds like
> > a network related problem as suggested by morpheus, or an umounted
> > file system that is in your PATH.
> 
> I think, that's unlikely.
> First, he doesn't have the problem when using vi on terminal, hence it
> whould have something to do with X. If it would be a PATH problem it
> should affect terminal mode as well.

startx or [xkg]dm may change PATH.

> Second, i can add foolish things that don't exist at all to my PATH and
> it wouldn't slow down my machine at all.

Things that exist but take a while to mount can delay execution:

[eben@pc eben]$ time date
Tue Dec 14 13:26:54 EST 2004

real    0m0.002s
user    0m0.000s
sys     0m0.000s

[eben@pc eben]$ time PATH=/mnt/dvd1:$PATH date
Tue Dec 14 13:28:37 EST 2004

real    0m2.298s
user    0m0.000s
sys     0m0.000s

I can easily see how putting, say, an NFS-mounted directory, or a 
smbfs-mounted directory in $PATH might cause delays.

> Moritz, try a "watch ps -C gvim" in an XTerm. Launch another XTerm and
> from there try launching gvim. (Replace gvim in both cases by whatever
> application, if you don't have it.) Watch if gvim shows up in the first
> Terminal right the moment you start gvim from the second, or the moment
> when the window appears.
> 
> If it shows up right away, it's an indication that it has trouble
> communicating with the X server. If it shows when the window appears,
> that's an indication for theories the like of morpheus'.

Or, do "strace <program> 2>&1 | less -S" to find out where the delay is.

Does the delay still happen when you run "/bin/vi" instead of "vi"?

-- 
-eben    ebQenW1@EtaRmpTabYayU.rIr.OcoPm    home.tampabay.rr.com/hactar

          Q: What kind of modem did Jimi Hendrix use?
          A: A purple Hayes.