Thanks! This looks mostly good now, I'll merge this.
This bit in apport-unpack still has quite some optimization potential:
for key in bin_keys:
with open(report, 'rb') as f: pr.extract_key(f, key, dir)
This reads the report file n times (for #number of binary keys). It would be much faster to extract all keys sequentially in one go. This would require either changing the API of load() to generate a list of binary keys which is in the order as they appear in the file, or changing the API of extract_key() to accept a collection of keys and extract them all. The latter is obviously better in terms of API stability.
Thanks! This looks mostly good now, I'll merge this.
This bit in apport-unpack still has quite some optimization potential:
for key in bin_keys:
pr. extract_ key(f, key, dir)
with open(report, 'rb') as f:
This reads the report file n times (for #number of binary keys). It would be much faster to extract all keys sequentially in one go. This would require either changing the API of load() to generate a list of binary keys which is in the order as they appear in the file, or changing the API of extract_key() to accept a collection of keys and extract them all. The latter is obviously better in terms of API stability.