-
Notifications
You must be signed in to change notification settings - Fork 1k
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
System.OutOfMemoryException when creating delta for (large) files #651
Comments
Version 1.4.4 - I'm having the same issue. file size is around 130mb DeltaPackageBuilder: We couldn't create a delta for sharedassets0.assets.resS, attempting to create bsdiff |
Instead of ReadAllByte here: Squirrel.Windows/src/Squirrel/DeltaPackage.cs Line 182 in de5baa9
We should compare files in streams like this: |
@Thieum I think this is worth exploring, so I've marked this as |
I've reproduced this in latest, Squirrel.Windows v1.9.1 via electron-winstaller v3.0.4. My environment was 8GB of RAM, package sizes ~780MB. |
Does this actually stop packaging? afaik even though the error message is unfortunate, the end result is correct - it's probably Unlikely that we'll be able to generate a usable diff for super gigantic files given our current algorithms (mspatch and bsdiff). Proper support for giant files probably requires a block-based approach - i.e. diffing sections of a file instead of the whole thing en masse. While this is a Worthwhile Endeavor, it's also not a quick fix. |
My call to electron-winstaller's Although not quick to fix, larger apps have the most to benefit from delta packages. Surprisingly, when I went to reproduce this again, 2 of my tests actually produced a delta package. It was ~150MB instead of ~780MB. However, attempting the upgrade, squirrel was unable to apply the delta package and fell back to the full package.
|
I just fixed this by replacing the file compare function and updating bsdiff to vcdiff in my branch https://github.com/Goxiaoy/Squirrel.Windows/tree/vcdiff see the difference develop...Goxiaoy:vcdiff |
@goxiaoy, thanks for that. I tried using your changes with vcdiff and deltas are generated much faster than with bsdiff and without memory exceptions or other issues, awesome work! - !deltaPathRelativePaths.Contains(x.Replace(".diff", ".bsdiff")) || deltaPathRelativePaths.Contains(x.Replace(".diff", ".vcdiff"))
+ !deltaPathRelativePaths.Contains(x.Replace(".diff", ".bsdiff")) && deltaPathRelativePaths.Contains(x.Replace(".diff", ".vcdiff")) |
The following happens with version 1.2.5 (via https://github.com/electron/windows-installer version 2.0.5) during diffing:
Note that there is still enough physical memory when this happens (about 4gb). The files are about 160mb. Works without problems for files that are around 50mb.
The text was updated successfully, but these errors were encountered: