optimising "change CWD" algorithm in subshell mode

Egmont Koblinger egmont at gmail.com
Mon Nov 5 21:37:56 UTC 2012


Hi guys,

I looked at the problem a while ago, and figured out that bash's speed
improved quite a lot during versions, even though the latest is still not
as fast as it should be, but much better than previous versions.  I figured
out that with bash-4.2 the slowness it bearable and wasn't worth it for me
to investigate any further.

Dmitry, please make sure that you also use the newest bash.  If you're not,
upgrading will perhaps significantly improve your experience.

I'm really not sure about the crash, though.

cheers,
egmont

On Mon, Nov 5, 2012 at 10:25 PM, Andrew Savchenko <bircoph at gmail.com> wrote:

> 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
>
> _______________________________________________
> mc-devel mailing list
> https://mail.gnome.org/mailman/listinfo/mc-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.midnight-commander.org/pipermail/mc-devel/attachments/20121105/4851243c/attachment.html>


More information about the mc-devel mailing list