unitypackage_extractor icon indicating copy to clipboard operation
unitypackage_extractor copied to clipboard

Hangs on large files

Open Cobertos opened this issue 4 years ago • 6 comments

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

Cobertos avatar Oct 17 '21 07:10 Cobertos

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.

Cobertos avatar Oct 17 '21 07:10 Cobertos

I'm thinking:

  1. Add an --unsafe flag to use tarfile instead of tarsafe
  2. 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

Cobertos avatar Oct 17 '21 08:10 Cobertos

@catfag any thoughts maybe?

Cobertos avatar Oct 17 '21 08:10 Cobertos

Yeah this tool is super slow

CrackerHax avatar Dec 16 '21 10:12 CrackerHax

Having some output, either progress or just "working on it..." would help a lot

OneManMonkeySquad avatar Jan 15 '22 10:01 OneManMonkeySquad

For me it is 58 seconds for a 2.2MB file.

kotori2 avatar Dec 15 '22 07:12 kotori2