Potential improvement to 7z extraction
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 275
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
I have a 1.4GB 7zip archive that consists of a single solid block. In the root of the archive are 11 directories.
When I extract the archive using the 7zip context menu or such, the operation takes around 15 seconds. When I open the archive in fman then select and copy all the files (this is the only way I could figure out how to extract within fman), the operation takes around three minutes. When I use a plugin I'm working on to extract the entire archive, the operation takes around 15 seconds.
Looking at the code I couldn't work out exactly what goes on when using the open-select-copy method. But I'm guessing that each selected object is extracted with a separate call to 7za, which is inefficient due to the nature of solid archives.
If this is the case, a possible alternative would be to provide 7za with a "list file" containing the selected files, so they can all be extracted with one call. I tested this with a modification to my plugin and extracting the same files as above took around 15 seconds.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace the open-select-copy extraction entry point and how it invokes 7za; the issue provides no file or test names. Compare that path with the plugin's single-call extraction approach, then verify that extracting all selected files from a solid archive uses one efficient operation and preserves existing extraction behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100