Re: optimising "change CWD" algorithm in subshell mode


On Tue, 6 Nov 2012 07:44:13 +1100 Dmitry Smirnov wrote:
> On Tue, 6 Nov 2012 04:09:45 Oswald Buddenhagen wrote:
> > On Sun, Nov 04, 2012 at 11:43:35PM +1100, Dmitry Smirnov wrote:
> > > What do you think would be the best to do about it?
> > 
> > find out where the slowness *actually* comes from. oprofile, or maybe
> > callgrind (once you isolated the process).
> I don't know where slowness comes from (self-evidently it becomes slower with 
> the growing length of full path)

That's why you are asked to use oprofile to find out. You may use
systemtap as well.

My readings shows that bash is slow here, not MC; your mileage may vary,
of course. But problems must be fixed where they occur, not where it is
convenient to put a hack for you.

> but *crash* comes from long string (>1024 
> characters) passed to bash hence it make sense to limit that if possible.

I set up your locale, generated dirs via:
for n in $(seq 100); do DN="${DN}/notsolongdirnametotestnested_$n"; done; mkdir -p "./${DN}"
and I can move throught the end of this tree without a crash and with
some small slowdown (about 1-2 seconds in the end).

I use mc-4.8.3-36-gf1075b8 and bash-4.2_p37.

Best regards,
Andrew Savchenko

Attachment: pgpfrEjxfBKBG.pgp
Description: PGP signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]