[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Enhancing lintian performance for large source packages



Hello,

This week I gave a shot at profiling lintian. I took a large source package at hand (~400 MB) [1], built it and ran lintian on .changes file under NYTProf:

$ PERL5OPT=-d:NYTProf bin/lintian -EviI --pedantic ../*.changes

NYTProf highlighted that over 70 % of the runtime was spent in searching for longest lines in source files as part of Lintian::Check::Files::SourceMissing and Lintian::Check::Files::Contents::LineLength checks. I modified them to use better performing solutions for the same task and managed to decrease their time share to 32 % for the package in question. This reduced lintian runtime from 2278s to 820s for the package in question. I opened three MRs for lintian with these changes [2][3][4].

This gives me some hope that parts of lintian could be made to perform better. Next step would be to run lintian under NYTProf for more diverse packages. UDD table of worst performing packages [5] (thanks Lucas!) is a great starting point to do so.

Best wishes,
Andrius

[1] this is a local package with non-free content which I use
[2] https://salsa.debian.org/lintian/lintian/-/merge_requests/506
[3] https://salsa.debian.org/lintian/lintian/-/merge_requests/508
[4] https://salsa.debian.org/lintian/lintian/-/merge_requests/509
[5] https://lists.debian.org/debian-devel/2024/05/msg00152.html


Reply to: