改进 WPF 应用程序冷启动:机器启动时运行程序的建议
是否可以在机器启动时加载 WPF 应用程序?我们的 WPF 应用程序在现有客户端硬件上花费了 30 秒,我们希望通过在计算机启动时启动我们的应用程序来“隐藏”该时间。但我们的应用程序在启动时启动这一事实对于用户来说应该是不可见的。
我们将如何构建这样一个东西?谷歌有一个术语可以提供教程吗?如果有一个我们可以获取的 WPF 特定版本,那就太好了。
注意:如果对此有任何道德疑虑(因为我同意,当你的计算机启动时启动 20 个程序是令人沮丧的!),我们正在为一个专门的行业构建软件,他们将使用他们的计算机主要运行我们的应用程序。
Is it possible to load your WPF application when the machine starts up? Our WPF application is taking 30 seconds on our existing client hardware, and we'd like to "hide" that by having our application startup when the machine is booted. But the fact that our application boots on startup should be invisible to the user.
How would we go about building such a thing? Is there a term to google that will provide a tutorial? It would be nice if there's a WPF specific-one we can grab.
Note: In case there's any moral qualms to this (since I agree that having 20 programs startup when your computer does is frustrating!), we're building software for a specialized industry who will be using their computer to run primarily our applications.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
最简单的方法是
这绝不会干扰正常应用程序的启动。好处是库可以被加载和抖动。您的应用程序仍然需要加载和加载的缺点初始化。
The easiest approach would be
This would in no way interfere with the starting of the normal application. The benefit is that the libraries get loaded and jitted. The drawback that your app still needs to load & initialize.
萨沙 还有一些此处未列出的技巧,即重新调整模块的基础、利用预取功能和压缩(UPX,yuk!)。
Sasha had a few more tips not listed here, rebasing your modules, leveraging the prefetch facility and compression (UPX, yuk!).