On Friday 04 April 2008 11:12, Jan-Oliver Wagner wrote:
> After all I am in doubt that the .desc stuff is a clever concept
> at all. So far I discovered more problems than benefits. Is there
> any benefit at all?

It decreases the startup time of the openvasd substantially.  My rough 
measurements yesterday were (wallclock time, with about 5200 plugins):

 with existing .desc files       2s
 no .desc files                 40s

It might be a good idea to profile the code a bit to see where openvasd spends 
its time when the cache is empty.  I suspect it really does spend most of the 
time parsing and exectuing the plugins, so it might not be easy to reduce the 
startup time without a cache.


> However, the small cure could be one of the following
>  * Don't create a .desc entry when compilation reports errors
>     (does only help for the specific case of SLAD, not for updated .inc's)

Actually, if the compilation or execution of the plugin returns an error code, 
openvasd will not create the .desc file.  That part actually works, if I'm 
readinf the code right.  The problem is the error reporting in the nasl 
interpreter.

An include statement which refers to a non-existing file only produces an 
error message on stderr, but it does not cause the parser to return an error 
code.  And later on, when the parsed plugin is executed to extract the 
description and cannot call a function because it is defined in the missing 
include file, the interpreter, too, only produces an error message, but no 
error return code.

>  * libopenvas/store.c (store_load_plugin): do the mtime check
>     for included files as well.

That would require a way to keep track of which include files are needed by 
which plugins.  Or, as a brute force solution, invalidate the 
entire .desc-cache when any of the .inc files have changed.

   Bernhard

-- 
Bernhard Herzog                              Intevation GmbH, Osnabrück
Amtsgericht Osnabrück, HR B 18998             http://www.intevation.de/
Geschäftsführer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner

Attachment: pgp339VJJwbzS.pgp
Description: PGP signature

_______________________________________________
Openvas-devel mailing list
[email protected]
http://lists.wald.intevation.org/mailman/listinfo/openvas-devel

Reply via email to