Actually, I'm not sure of what I did ; I couldn't apply the patch with
"patch", and I made the changes manually ; but it seems that all the free()
are in the #if 0 block.
What is exactly your patch supposed to do ?

2010/6/10 Vivien Raoul <ranki...@gmail.com>

> Thank you for the patch. I applied it, the force-reload seems to be
> (really) faster. I'll tell you if I see changes on selfchecks.
>
> 2010/6/10 Török Edwin <edwinto...@gmail.com>
>
>> On 06/10/2010 12:30 PM, Vivien Raoul wrote:
>>
>> > What exactly do you mean by reload ? The fact is that I can't browse
>> anymore
>> > since the selfcheck. It happens almost every hour and lasts between 3
>> and up
>> > to 8 minutes.
>> > If I do a force-reload manually (I don't know if it's the same
>> operation) :
>> >
>> > # time /etc/init.d/clamav-daemon force-reload
>> > Stopping ClamAV daemon: clamd Waiting .  .  .  .  .  .  .  .  .  .  .  .
>>  .
>> > .  .  . .
>> > Starting ClamAV daemon: clamd .
>> >
>> > real    4m40.967s
>> > user    0m12.533s
>> > sys     2m3.960s
>> >
>> > If the operation which takes time is freeing the database, is there a
>> way to
>> > make it faster ?
>>
>> Yes that can speeded up, I never thought that freeing anything would
>> waste so much time.
>>
>> Try applying this patch (with 'patch -p1', or 'git apply').
>> If it doesn't help please open a bug at bugs.clamav.net and we'll try
>> something else (please post the full output of clamconf when you open
>> the bug).
>>
>> diff --git a/libclamav/readdb.c b/libclamav/readdb.c
>> index ce9133d..d8241f8 100644
>> --- a/libclamav/readdb.c
>> +++ b/libclamav/readdb.c
>> @@ -2853,6 +2853,7 @@ int cl_engine_free(struct cl_engine *engine)
>>  #ifdef CL_THREAD_SAFE
>>     pthread_mutex_unlock(&cli_ref_mutex);
>>  #endif
>> +#if 0
>>     if(engine->root) {
>>        for(i = 0; i < CLI_MTARGETS; i++) {
>>            if((root = engine->root[i])) {
>> @@ -2901,6 +2902,7 @@ int cl_engine_free(struct cl_engine *engine)
>>        mpool_free(engine->mempool, pt->virname);
>>        mpool_free(engine->mempool, pt);
>>     }
>> +#endif
>>
>>     while(engine->dbinfo) {
>>        struct cli_dbinfo *pt = engine->dbinfo;
>>
>>
>> Best regards,
>> --Edwin
>> _______________________________________________
>> Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
>> http://www.clamav.net/support/ml
>>
>
>
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml

Reply via email to