Re: Couple of patches
Raphael Geissert <email@example.com> writes:
> Attached is the first set.
Will review in a bit. Thank you!
> We could speed up lintian a bit more by:
> * Running the collection scripts in multiple threads.
> * Use threads or Async to run some of the Lintian::Collection methods if we
> know we are going to use them, before the actual checks/ script needing it
> is called (proper execution order of checks/ scripts is needed).
I don't want to dismiss using threads, since I know that making disk
access asynchronous can help quite a bit, but I'm very nervous about
introducing the complexity of thread management into the Lintian code.
Threads tend to cause a lot of obscure and difficult-to-debug concurrency
If we can avoid adding threads and still get reasonable performance, I
think it will save us headaches later.
> * Turning the *desc files into perl code to avoid the extra overhead of
> parsing them everytime lintian is run. This could be done in a private/
> script which would be run at some step during the package build process.
> Only the final .deb package would really benefit from this; although we
> have to be careful if we use make to know when a .desc file has changed
> due to git's lack of timestamps preservation.
I suspect that this (and precompiling the data files for Lintian::Data
objects, which is a similar problem) would save less than 1% of Lintian's
run time, and hence not be particularly worth it, but I could very well be
wrong). If I'm wrong, though, it's a good idea. I like the idea of
precompiling for the final package.
There are some more obvious things that we can do first, such as
eliminating Tag and its second read of all the tag metadata by merging it
into the new Lintian::Tag::Info module. I'm slowly working on that.
Russ Allbery (firstname.lastname@example.org) <http://www.eyrie.org/~eagle/>