Node modules and their dependencies can easily reach tens of thousands of files across thousands of directories. My project, apart from that includes thousands of small image and audio files. This is obviously the reason for the many "slow starting time" issues people post. The project is ~300mb in its entirety.
If app is shipped with tree loading time is 2-3 seconds, which while not ideal is acceptable. However, this is highly undesirable for many reasons.
Packaged in an uncompressed .nw (zip) files leads to a loading time of 30-35 seconds, which I think everyone would agree is a disaster for any sort user experience.
I have tried to search thoroughly the nwjs and nw-builder pages, am I to understand this remains an unsolved issue?
I can post "reproducible code", that is a trivial task, if anyone really needs it.
Thanks in advance for any input or advice.
OS Win7 x64
nw.js v0.17.4
Node v6.6.0
Chromium 53.0.2785.116
I've seen the same behaviour on Windows 10
Currently zip file, including "uncompressed", are extracted to a temporary folder on start. If you have a big application or too many files or on a slow hard disk, the extraction may last in long time.
We recommend not to package your app. Just put all your files in a folder named package.nw. See http://docs.nwjs.io/en/latest/For%20Users/Package%20and%20Distribute/#package-option-1-plain-files-recommended .
If you use HDD, try to watch system behavior on your app launch. My project also have lot of NPM dependencies, and on my app start Windows 10 tryes to index everything, so System process or Windows Search Indexation immediately load HDD to 100%.
@rogerwang ,is this a normal behavior or a bug if the package is big or contains too many files?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Best practice is not to zip at all. Put your files in a package.nw folder and place the folder next to your nw.exe.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
Currently zip file, including "uncompressed", are extracted to a temporary folder on start. If you have a big application or too many files or on a slow hard disk, the extraction may last in long time.
We recommend not to package your app. Just put all your files in a folder named
package.nw. See http://docs.nwjs.io/en/latest/For%20Users/Package%20and%20Distribute/#package-option-1-plain-files-recommended .