?
Solved

Application Performance

Posted on 2006-06-22
8
Medium Priority
?
233 Views
Last Modified: 2013-11-20
I have several applications that reside on a server that are run by multiple users.  Do to recent networking changes the applications are taking much longer to start (15 seconds vs 3 seconds).    A big part of the problem is that we link in several very large static libraries which makes the exe several MB.  Would linking the libraries as DLLs help the performance significantly?  What other suggestions would you have for improving the startup time?

Thanks,

Joe
0
Comment
Question by:jribble
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 48

Expert Comment

by:AlexFM
ID: 16962868
Is it possible that when application starts, it tries to find Dll in some network directory? This can take a lot of time, especially if required server is not connected. I would check system PATH variable.
Maybe some program initialization code tries to make some connection.
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 16963059
<A big part of the problem is that we link in several very large static libraries which makes the exe several MB>

With the disk (and cache) performance I can hardly believe that would make much of a difference, especially as you experience such a drop in performance after network changes.

Having a drive mapping (rather than UNC) *may* help.
0
 

Author Comment

by:jribble
ID: 16963725
When I run the same application off my local (C:) drive, it starts in less than 3 seconds (using the same path).  When I copy a file from our network drive to my local drive, it takes relatively long time - so I am fairly certain is has to do with the time is takes to load the executable.  I'm guess it has to load the executable each time it is run - correct?  Do DLLs work the same way?  Or are they saved in the computer's memory so that they don't have to be loaded each time?
0
Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

 
LVL 48

Expert Comment

by:AlexFM
ID: 16966359
Do you mean that you start application from other computer? In this case test how many time takes to Windows Explorer to copy exe and all Dll files from network to local drive - this is executable loading time.
When application starts from local drive, OS tries to use existing memory cache when it is possible, usually second time application starts faster. I don't know whether this is done for application from network drive.
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 16966594
exe vs dll.
If your exe calls a function in a dll (eg during startup) then the dll also needs to be loaded into memory.  (loading 2MB exe vs loading 1MB exe and 1MB dll - hmmm).
Using dlls will be an advantage if you use LoadLibrary and GetProcAdress for functions - then a dll only needs to be loaded when required.
0
 

Author Comment

by:jribble
ID: 16968495
One thing I may have failed to mention is that this application gets lauched many times during a given day - we have another application that acts as a launchpad (maybe this wasn't the best design).  Anyway, in that case, would DLLs provide any advantage?
0
 
LVL 14

Accepted Solution

by:
wayside earned 2000 total points
ID: 16972305
Generally, static linking makes the program load much faster, because a lot of time is spent resolving the addresses of the imported functions, which you don't have to do if the image is statically linked.

If the dll's are local, that might save time because they won't have to be pulled over the network. If the dll's are on the same network machine as the exe, you won't gain anything by using dll's, and it will likely get slower, because the statically linked image will be smaller in size than the dynamically linked image + dll's, plus the extra time to resolve the addresses.

> Or are they saved in the computer's memory so that they don't have to be loaded each time?

When the program exits, the dll's are unloaded unless they are in use by another program. You could maybe try keeping a stub program running all the time that keeps the dll's loaded, but that seems awfully kludgey to me.

I think your best bet is to fix your networking.

If you can't do that, another possibility is to investigate using a PE executable compressor, these can often reduce the size of your exe by 60-70%. With that much less to pull over the network, it might significantly increase the startup time.

Another option is to never exit the program; if the user closes all the windows, don't exit, and have the lauchpad app send it a message to reopen its windows. That way you only take the startup hit once.
0
 

Author Comment

by:jribble
ID: 16992722
I downloaded a PE executable compressor (PECompact2) and was able to reduce my executable size by nearly 90%.  This improved startup time significantly!  Thanks for the tip.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question