On 24/07/16 22:33, Bernhard Voelker wrote:
> On 07/22/2016 10:46 AM, Philipp Thomas wrote:
>> To help a customer that complained about the time it takes for df to check
>> one of their machines with nearly 22000 lines in /proc/self/mountinfo, my
>> collegue came up with this patch that uses a hash table for seaching in 
>> filter_mount_list() and get_dev(). Data from said machine:
>>
>> Without patch:
>> real    0m2.273s
>> user    0m0.768s
>> sys     0m1.500s
>>
>> real    0m1.731s
>> user    0m0.532s
>> sys     0m1.188s
>>
>> With patch:
>> real    0m1.286s
>> user    0m0.052s
>> sys     0m1.232s
>>
>> real    0m1.066s
>> user    0m0.028s
>> sys     0m1.032s
>>
>> Is this patch acceptable?
> 
> Hi Philipp,
> 
> the patch was missing, so I attached it from here:
> 
> https://build.opensuse.org/package/view_file/Base:System/coreutils/coreutils-df-hash-in-filter.patch?expand=1
> 
> Maybe adding an IF_LINT'ed hash_free call would be worth;
> otherwise it looks good to me.

Excellent. +1
Worth a mention in improvements in NEWS too.

thanks,
Pádraig


Reply via email to