On Mon, Apr 27, 2009 at 08:18:43AM -0500, Ron wrote:
My thought is, if it's generated on the fly, you wouldn't ever need to
write to the file. That would solve all your issues. The downside, I
suppose, is that it wouldn't be scalable.
Yeah, the whole point of the file is to avoid the overhead of reading
every script and generating a category table each time. But maybe
that is an over-optimization. If anyone wants to make a patch which
does it all fly, and then benchmarks that version to determine the
computation time differences with and without script.db, that would be
great! It is important to test it with 1,000+ scripts though. NSE
only comes with 56 scripts now, but it continues to grow. You could
create such a large number of scripts by taking about 20
differently-named copies of each of our current scripts. That way you
still have some diversity compared to 1,000 copies of the same trivial
script. Or I suppose 1,000 copies of one of our more complex scripts
might be OK for testing.
If doing category generation on the fly with 1,000+ scripts does not
materially increase computation time, I'd support eliminating
script.db and doing that.