Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hangs on large files #21

Open
Cobertos opened this issue Oct 17, 2021 · 6 comments
Open

Hangs on large files #21

Cobertos opened this issue Oct 17, 2021 · 6 comments

Comments

@Cobertos
Copy link
Owner

Cobertos commented Oct 17, 2021

Reported in #20 (comment) 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
Copy link
Owner Author

Cobertos commented Oct 17, 2021

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
Copy link
Owner Author

Cobertos commented Oct 17, 2021

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
Copy link
Owner Author

@catfag any thoughts maybe?

@CrackerHax
Copy link

Yeah this tool is super slow

@OneManMonkeySquad
Copy link

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

@kotori2
Copy link

kotori2 commented Dec 15, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants