Commit Graph

15 Commits (main)

Author SHA1 Message Date
Johannes Schauer Marin Rodrigues 199e577757
tarfilter: add --type-exclude option 5 months ago
Johannes Schauer Marin Rodrigues 6068e7d22e
tarfilter: fixup comment 6 months ago
Johannes Schauer Marin Rodrigues 3c0990d050
tarfilter, coverage.py: changes for black 23.1.0 1 year ago
Johannes Schauer Marin Rodrigues 7d7d757f00
tarfilter: add --transform option 2 years ago
Johannes Schauer Marin Rodrigues 902bc55c4d
tarfilter --idshift now provides taridshift 2 years ago
Johannes Schauer Marin Rodrigues e3a7b7d013
tarfilter: add --strip-components option 2 years ago
Johannes Schauer Marin Rodrigues 39a266bce2
add my name to several scripts 3 years ago
Johannes Schauer Marin Rodrigues dddccd5e55
tarfilter: expand description text 3 years ago
Johannes Schauer Marin Rodrigues 236b84a486
tarfilter: add --pax-exclude and --pax-include to strip extended attributes because tar2sqfs only supports user.*, trusted.* and security.* 3 years ago
Johannes Schauer Marin Rodrigues bd5d3c3dab
tarfilter: remove leftover debugging statement 3 years ago
Johannes Schauer Marin Rodrigues bbf12c221d
tarfilter: fixup last commit by formatting with black 3 years ago
Benjamin Drung 043ab3bbf0
tarfilter: Compile prefix pattern only once
According to Debian bug #978742, mmtarfilter has a slow performance with
many path exclusions. The execution can be speed up if the regular
expression is only compiled once instead of every time in the hot loop.

Signed-off-by: Benjamin Drung <benjamin.drung@cloud.ionos.com>
3 years ago
Josh Triplett 5a7dbc10c7
Optimize mmtarfilter to handle many path exclusions
mmtarfilter uses fnmatch to handle path exclusions and inclusions.
Python's fnmatch handles shell patterns by translating them to regular
expressions, with a 256-entry LRU cache. With more than 256 path
exclusions or inclusions, this LRU cache no longer works, and every
invocation of fnmatch on every file in every package will re-translate
and re-compile a regular expression, resulting in much worse
performance.

Translate all the shell patterns to regular expressions once. For an
mmdebstrap invocation with around 500 path filters, this speeds up
mmdebstrap by more than a minute.
3 years ago
Johannes 'josch' Schauer c51c69ca13
tarfilter/taridshift: use argparse 3 years ago
Johannes 'josch' Schauer 465c056434
no longer needs to install twice when --depkgopt=path-exclude is given by filtering the tarball with new tarfilter utility 4 years ago