如何拆分exe以便更快地访问? [英] How to split a exe for faster access ?

查看:85
本文介绍了如何拆分exe以便更快地访问?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经制作了一个大规模的c#应用程序,我的exe大于40 mb,&它要慢。

我想让我的用户控件,dlls&其他资源与主.exe分开,并希望在运行时使用它们以便更快地访问。那么解决方案是什么?



如果有人能告诉我,我会非常满意。



谢谢你。

解决方案

您可以将主项目中的类和其他组件移动到解决方案中的单独项目中。但这不会使您的应用程序变小。如果有的话会使总体尺寸变大。



我假设你的抱怨需要很长时间才能开始吗?



.Net的问题是当应用程序启动它时必须确认机器代码的IL(中间语言)。这需要时间。





本文讨论了一些改善加载时间的方法:



http://msdn.microsoft.com/en-us/magazine/cc163655。 aspx [ ^ ]



虽然最简单的方法是创建一个加载器应用程序,这是一个简单的加载应用程序。然后使用反射启动应用程序的其余部分。


如果您需要在应用程序中加载和卸载各种工具(封装在dll中),那么您需要探索如何创建和使用插件。



CodeProject有关于插件架构的文章; Windows Communication Foundation(WCF)是一个较新的插件工具,您应该了解WCF提供的内容。



CodeProject插件,一般:[ ^ ],[ ^ ]。



CodeProject和WCF插件:[ ^ ]



WCF:[ ^ ]

I have made a large scale c# application, and my exe is greater than 40 mb, & its to slow.
I want to make my user controls, dlls & others resourses seperate from main .exe and want to use them in runtime for faster access. So Whats the solution ?

if anyone can tell me, i will very much satisfied.

Thankyou.

解决方案

You can move classes and other components from your main project to separate projects within your solution. But this won't make your application any smaller. If anything it will make the total size larger.

I'm assuming your complain is it takes too long to start?

The problem with .Net is when the application start it has to confirm the IL (Intermediary Language) to machine code. This takes time.


This article discusses a number of ways of improving load time:

http://msdn.microsoft.com/en-us/magazine/cc163655.aspx[^]

Although the simplest way would be to create a loader application which is a small application which simply says loading. Then launch the rest of your application using reflection.


If what is required is the loading, and unloading, of various facilities (encapsulated in dll's) in your application, then you need to explore how to create, and use, plug-ins.

CodeProject has articles on plug-in architecture; Windows Communication Foundation(WCF) is a newer facility for plug-ins, and you should explore what WCF offers.

CodeProject plug-ins, general: [^], [^].

CodeProject and WCF plug-ins: [^]

WCF: [^].


这篇关于如何拆分exe以便更快地访问?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆