-
Notifications
You must be signed in to change notification settings - Fork 82
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
Replace DotNetZip with System.IO.Compression #862
Conversation
My mighty grep on the mirror pulled out 3 DLLs that contain the string "DotNetZip": Gramophone, PlattenTek and Infinite Backups... checking what this is about now |
Gramophone 2.x crashes with an assertion failure, which makes me think I should make 1.0.5 the latest version on the updater 🤔 anyway, seems like continuing to ship DotNetZip is enough to make those mods work |
Startup timing with Spring Collab + Strawberry Jam + dependencies enabled and Cache folder deleted, Celeste being installed on an NVMe SSD:
... huh 🤔 RAM usage seems around the same (looking at System Monitor) |
same with a Cache folder already built:
so it definitely doesn't hurt performance |
d820c89
to
ef6223c
Compare
re. memory stream: it would probably be better at least look further into |
the existence of an "archive stream owner" lets me think we can't read from multiple entries at the same time anyway 🤔 they're going to be fighting over the archive stream position otherwise, and I think that's why the "invalid compression method" thingy happens: thread 1 seeks elsewhere, thread 2 reads garbage and freaks out |
oh so there's only one underlying stream, right |
ef6223c
to
d7bf7ad
Compare
Someone recently ran into this:
... which looks like a race condition in zip file accessing to me. And since the zip handling is quite ... complex, with pools of zip file streams and reflection to access DotNetZip internals, I'm trying to replace it with the
System.IO.Compression
implementation.Points to watch out for:
MemoryStreams
with file contents when they are requested, becauseZipArchive
doesn't seem thread-safe (I've got "unsupported compression method" when I tried), does this use way too much RAM?