Significant performance problem with modprobe

Timo Teräs timo.teras at iki.fi
Wed Jun 15 05:24:06 UTC 2011


On 06/15/2011 01:10 AM, Bernhard Reutner-Fischer wrote:
>> Duh. It looks like the bb_get_chunk_with_continuation always allocates
>> new memory for the returned string. That could be kinda slow. It'd be
>> faster if the line reading buffer was allocated only once (and grown
>> only when necessary).
>>
>> But this realloc/free business is probably another culprit that has
>> global effect. Some one should redesign bb_get_chunk_with_continuation
>> so it can be used with pre-allocated buffers.
> 
> http://git.uclibc.org/uClibc/tree/libc/misc/internals/parse_config.c#n58

Great. So uClibc and busybox variants are that much diverged.

[ot] The uClibc variant is suboptimal too, since it's using strchr for
finding '\n' which is known always to be the last character in the
string if present.

Anyone interested to fix the busybox line reader which is the more
broken one?

- Timo


More information about the busybox mailing list