bug-bash
[Top][All Lists]
Advanced

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

Re: Huge execution time in 4.2, WAS: for; do; done regression ?


From: Jan Schampera
Subject: Re: Huge execution time in 4.2, WAS: for; do; done regression ?
Date: Fri, 07 Jan 2011 16:34:04 +0100
User-agent: Mozilla-Thunderbird 2.0.0.24 (X11/20100329)

Chet Ramey wrote:

I can't imagine this is just some debugging code still active (it's a beta).

Imagine.  Anything that doesn't have a version tag of `release' has DEBUG
enabled for the preprocessor, which enables MALLOC_DEBUG.  If you're using
the bash malloc, MALLOC_DEBUG turns on extensive memory checking and
allocation tracing.  All active allocations are kept in a hash table with
8K entries, and when you fill up that hash table, each new allocation has
to search the entire table before throwing away an old entry.  That quickly
degenerates.  This can be fixed, but it hasn't become a priority yet.

Wow. A huge difference. Anyways, if you tell me how I'll try to track it down, but I read in the other thread you already try to gprof it.

--
Be conservative in what you do, be liberal in what you accept from others.
- jbp, master of the net, in RFC793




reply via email to

[Prev in Thread] Current Thread [Next in Thread]