optimising "change CWD" algorithm in subshell mode
Andrew Savchenko
bircoph at gmail.com
Mon Nov 5 21:25:59 UTC 2012
Hello,
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.midnight-commander.org/pipermail/mc-devel/attachments/20121106/44d81b0a/attachment.asc>
More information about the mc-devel
mailing list