[英]Electron windows installer too slow
我正在使用电子窗口安装程序: https : //github.com/electron/windows-installer,并且在Windows上运行安装程序时,确实需要很长时间(超过10分钟),这是否正常?
@danibuiza I have found that electron applications that include native modules (ones which require that you compile them with electron-rebuild
.rebuild) take exceedingly long amounts of time to install, as compared with other apps. @danibuiza我发现,与其他应用程序相比,包含本机模块的电子应用程序(需要您使用
electron-rebuild
.rebuild对其进行编译的)的安装时间非常长。 This has less to do with the installer and more to do with the packaging of application. 这与安装程序无关,而与应用程序打包有关。 Since you can't package native modules into the electron blob
app.asar
(you must list your native packages in the unpackDir
option of the asar
configuration when doing the electron-packager), this means the entire tree structure of such packages must be used and installed as a collection of files. 由于您无法将本机模块打包到electronic blob
app.asar
(在执行电子打包程序时,必须在asar
配置的unpackDir
选项中列出您的本机软件包),这意味着必须使用此类软件包的整个树结构并作为文件集合安装。 This is often a large additional number of files in the electron application, as opposed to them all being compressed into the asar along with all other application components. 在电子应用程序中,这通常是大量额外的文件,而不是将它们与所有其他应用程序组件一起压缩到asar中。
In any case, its important to have your electron-packager
option settings be as optimized as possible so that your installer will later have the most concise collection of assets as possible. 无论如何,最重要的是要使
electron-packager
选项设置尽可能优化,以使安装人员以后可以最简洁地收集资产。 In my opinion, this means properly using the asar
and prune
options when using electron-packager
. 我认为,这意味着在使用
electron-packager
时正确使用asar
和prune
选项。
Hopefully those suggestions will help with your resultant overall install time. 希望这些建议对您最终的整体安装时间有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.