-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
fix(bundler/nsis): calculate estimated size on build system #8233
Conversation
Yeah this can be backported, we don't provide any guarantees that this file won't be broken at any time.
We do have an option to control the algorithim, we can add a variant to disable compression.
I am not sure I am following, the progress bar doesn't depend on the |
Oh right. Nevermind then, i mixed something up. |
Okay turns out my GetSize change was broken (always returned |
…thing so i forgot it exists in rust...
So the project from the devs that reported this issues includes 200+ folders and 1000+ files via the resources config. In this case it's a node_modules folder (intentionally) and putting aside whether or not one should bundle a node_modules folder this can also easily happen in non-nodejs contexts.
Anyway, said app took ~8 minutes to install on my machine. Btw, the files are ~20mb total.
1st commit: Pointing the GetSize call directly at the file instead of the whole folder with a mask reduces that to ~12 seconds - btw the GetSize docs are super confusing, i also thought it can only point to a folder so i looked at other things before i tried this first...
2nd commit: This i'm a bit unsure about whether we can add it to v1 or only to v2 which is why i split it up into another commit. Basically the folder structure is now calculated upfront on the build system, sorted and deduplicated and in the installer the dir creation and file extraction are now 2 steps to not create the same dir again and again. This reduced the install time to ~10 seconds.
Further "improvements"