summaryrefslogtreecommitdiffstats
path: root/backends
diff options
context:
space:
mode:
authorOmar Sandoval <[email protected]>2024-07-23 15:35:41 -0700
committerAaron Merey <[email protected]>2024-07-24 18:13:40 -0400
commitb2dd8b94d92bc14d144877374cf94d88030ec73b (patch)
treeda28d1958dbc18a2584eba7c6222fb5f2ce0cabf /backends
parent95a09d02b6965c7af201125c8830f0559855bf53 (diff)
debuginfod: optimize extraction from seekable xz archives
The kernel debuginfo packages on Fedora, Debian, and Ubuntu, and many of their downstreams, are all compressed with xz in multi-threaded mode, which allows random access. We can use this to bypass the full archive extraction and dramatically speed up kernel debuginfo requests (from ~50 seconds in the worst case to < 0.25 seconds). This works because multi-threaded xz compression splits up the stream into many independently compressed blocks. The stream ends with an index of blocks. So, to seek to an offset, we find the block containing that offset in the index and then decompress and throw away data until we reach the offset within the block. We can then decompress the desired amount of data, possibly from subsequent blocks. There's no high-level API in liblzma to do this, but we can do it by stitching together a few low-level APIs. We need to pass down the file ids then look up the size, uncompressed offset, and mtime in the _r_seekable table. Note that this table is not yet populated, so this commit has no functional change on its own. Signed-off-by: Omar Sandoval <[email protected]>
Diffstat (limited to 'backends')
0 files changed, 0 insertions, 0 deletions