unitypackage_extractor
unitypackage_extractor copied to clipboard
Hangs on large files
Reported in https://github.com/Cobertos/unitypackage_extractor/issues/20#issuecomment-937458915 and can confirm
It looks like the extractor is hanging on large files (on the extracting portion specifically). A 330MB package takes 660 seconds (exe) and 864 seconds (python -m) vs 8 seconds in v1.0.0.
Workaround is to use v1.0.0 if you want it fast and trust your .unitypackage
I believe this was when switching to tarsafe instead of tarfile as tarsafe does a iteration over names which was a previous source of slowness
Ideally tarsafe would need to be more performant... but I don't think Python gives any better way to check the tar before iteration.
I'm thinking:
- Add an
--unsafeflag to usetarfileinstead oftarsafe - Add a print message right before extraction like
Extraction checks the security of every .tar file entry. To speed up, add --unsafe if you trust your .unitypackage is not malicious
@catfag any thoughts maybe?
Yeah this tool is super slow
Having some output, either progress or just "working on it..." would help a lot
For me it is 58 seconds for a 2.2MB file.