Launcher: Remove 7za in favour of SharpCompress - #1465
julianxhokaxhiu wants to merge 1 commit into
Conversation
|
It goes without saying that if I find a way to squeeze even more the performance I'll be happy to open a subsequent PR |
|
I found an optimization pathway after retesting sorry. I'll move it back to ready as soon as I finished this one. //EDIT Nevermind, unfortunately the multi thread option is not possible as the library is not ready for it. So for now we're locked to existing performance. I did retest manually the So yeah...the tradeoff atm is keep a manual binary being used and fallback to SharpCompress when not possible to run it, or use SharpCompress and hope it gets better over time. From our experience most of users don't notice this difference on day to day basis on 7th and J8, so I guess should be fine on Memoria as well. Choice is yours :) |
|
While I fully agree with the external executable calls, I guess we shouldn't go back and forth everytime, especially if the situation is still the same as the situation that lead to include So for now, from my point of view, I'd go with keeping the current method. |
|
Fair enough, I'll move this to draft and I'll see if situation improves over time. Thank you |
|
This one is pending for SharpCompress 1.0 release which will contain all the patches I've submitted to bring performance on par with 7za. As soon as that will be available I'll resume the work on this PR. |
|
@julianxhokaxhiu , please don't forget to test this against all the mods registered in the catalog. :) |
|
@julianxhokaxhiu , FYI, I refactored mod download/extract/instsall a bit, and used SharpCompress for For other mods, I keep to use |
|
Makes total sense to me, thanks for the heads up. I'll cross this bridge again as soon as SharpCompress bumps the release. Until then it doesn't makes sense, but I'll ping you as soon as it's ready for review. Cheers! |
This PR aims at remove the
7za.exebinary in favour of usingSharpCompressas a generic library for all the archives ( including 7z ).I've seen through comments and previous PRs, that
7zawas added to handle "slow extraction on some 7z archives", so I decided to useMoguri Modas a test case which comes in 7z format and in fact I was able to verify that the SharpCompress existing code was extremely slow in unpacking it.Luckily we've had the very same problem on 7th Heaven/Junction VIII and I've worked extensively with the author in locating those bottlenecks and solving them once and for all.
While this was solved through dependencies update, unfortunately the performance gain didn't follow up on the cs implementation side in Memoria, as for 7z archives it was seeking for every file extraction instead of "reading the stream once". By fixing that and following the stream flow, now Moguri on my own PC extracts in about 1m 30s ( 5800X3D, SSD PCIe 5.0, DDR5 6000Mhz RAM ). The same time was required also by
7za.While it brings no "major benefits" of "screaming improvements", I think this PR brings some consolidation in removing "manual binary calls" in favour of native .NET libraries that its execution can be improved on where .NET runs ( thanks to the IL CPU recompilation ).
Any question feel free to ask.