473,473 Members | 1,947 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Optimization Question

I was reading the article "Performance Optimization in Visual Basic
..NET" at
http://msdn.microsoft.com/library/de...tchperfopt.asp.

One section states:
Loading a dynamic-link library (DLL) takes a considerable amount of
execution time. Bringing in a DLL only to call one or two procedures is
highly inefficient. You should try to generate the smallest possible
number of DLLs, even if this makes them relatively large. This means
your application should use as few projects as possible and large
solutions.
When I need to reference some code in multiple projects (e.g. a data
access class), I have been building it into a DLL and referencing the
DLL in my other projects. Does this mean that I should instead add a
reference to the data access layer PROJECT in my solution, rather than
a reference to the DLL that it produces?

When you have multiple projects in a solution, and references between
them, doesn't the compiler build them all into their own DLL anyway?
I guess I'm not sure what they mean and am looking for help. Thanks.

Nov 21 '05 #1
3 983
"cmay" <cm**@walshgroup.com> schrieb:
When I need to reference some code in multiple projects (e.g. a data
access class), I have been building it into a DLL and referencing the
DLL in my other projects. Does this mean that I should instead add a
reference to the data access layer PROJECT in my solution, rather than
a reference to the DLL that it produces?
Technically there is no difference between referencing the DLL and
referencing the project of the DLL. Referencing the project will give you a
better debugging experience.
When you have multiple projects in a solution, and references between
them, doesn't the compiler build them all into their own DLL anyway?


Each project will be built into a separate DLL.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #2

"cmay" <cm**@walshgroup.com> wrote
When you have multiple projects in a solution, and references between
them, doesn't the compiler build them all into their own DLL anyway?
I guess I'm not sure what they mean and am looking for help. Thanks.


You are correct. What we need is a way to ask the compiler to reach out
to a 'common' DLL and grab the IL code for inclusion into the current
project. I have made such a suggestion to the development team, but as
yet it is just talk.

Not only would it help you in your current situation, but it also would
help those who want to share 'packaged' code (think specialized Math
class) such that they can hand over the DLL and let the user use just
what they need for inclusion in their project. Even if there are over
100 routines in the DLL, the user may only need 10-15 of them, and
should have a way to 'statically link' to that DLL so that the desired code
is added to his project, without the need of shipping that much larger DLL.

LFS
Nov 21 '05 #3
Any idea why MS suggests that this would provide better performance
when it really doesn't?

Any word of if they are planning the kind of implementation you are
talking about?

Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Nick L. | last post by:
All, This is a general question regarding how, and if, compiler optimization techniques affect the general concept of being able to update a component of an application without requiring a...
20
by: Jakob Bieling | last post by:
Hi! I am using VC++ 7.1 and have a question about return value optimization. Consider the following code: #include <list> #include <string> struct test {
5
by: AC Slater | last post by:
Whats the simplest way to change a single stored procedures query optimization level? In UDB8 that is. /F
14
by: joshc | last post by:
I'm writing some C to be used in an embedded environment and the code needs to be optimized. I have a question about optimizing compilers in general. I'm using GCC for the workstation and Diab...
93
by: roman ziak | last post by:
I just read couple articles on this group and it keeps amazing me how the portability is used as strong argument for language cleanliness. In my opinion, porting the program (so you just take the...
22
by: NigelW | last post by:
This is really a question for the development team. Are there plans to improve the optimization of C# to MSIL? I ask this, as inspection with ILDASM of the MSIL code shows that, even with the...
5
by: wkaras | last post by:
I've compiled this code: const int x0 = 10; const int x1 = 20; const int x2 = 30; int x = { x2, x0, x1 }; struct Y {
0
by: Adam Sandler | last post by:
Hello, Using VWD 2005 here... I've noticed I've got .NET services on my system here: the .NET Runtime Optimization service and ASP.NET State service. I've noticed when the ASP.NET State service...
18
by: terminator(jam) | last post by:
consider: struct memory_pig{//a really large type: memory_pig(){ std::cout<<"mem pig default\n"; //etc... }; memory_pig(memory_pig const&){
20
by: Ravikiran | last post by:
Hi Friends, I wanted know about whatt is ment by zero optimization and sign optimization and its differences.... Thank you...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.