Click here to Skip to main content
15,896,432 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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.
Posted

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.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 2-Jan-14 21:38pm    
I don't think JIT compilation really delays start of the application. Just the opposite: the compilation is normally performed on per-method basis. That means that only the methods called during some start-up phase will be JIT-compiled. Usually, the reason for slow start up (if the machine is not ridiculously slow) would be just one: OP screwed up the architecture or general design of code.
Of course, dividing a project into smaller assemblies can be very useful, but it hardly can improve performance.

Just the real-life based speculation: don't you think that the developer who developed a really big product but did not learn anything about .NET/CLR (how else would you explain such a deep ignorance about assemblies and modules, the very heart of .NET?) is just weird? Of course, I would expect any kind of screw up, even something which we would never even think of... :-)

—SA
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: [^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900