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

Re: Excessive lintian memory usage



Russ Allbery <rra@debian.org> writes:

> I don't think that fully explains it, though, since when $info is
> reassigned when the next package is checked, the old $info should be
> garbage-collected.  I'll keep looking.

I think I found it.  checks/menu-format was using a global %file_index
hash that stored all files in the package, but it was a lexical global and
wasn't cleared with multiple calls to run, so I think it was accumulating
entries for every file in Debian.  Likewise, checks/menus had %all_files
and %all_links hashes that were similarly lexically global and weren't
ever cleared.  This was probably causing false negatives on lintian.d.o as
well.

checks/cruft also had a %warned hash that was accumulating all files for
which we issued cruft warnings, although that wouldn't have been as large.

The Contents file for all of Debian is 200MB.  Given that by the end of
the run we'd have two copies of that in memory and Perl isn't particularly
good about memory allocation overhead, I suspect that explains the bloat.

I'm testing and committing my patches now.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>


Reply to: