Solved

Needs hints to speed up the VB IDE for a large project

Posted on 2003-11-13
6
375 Views
Last Modified: 2010-05-01
Hi, I have a large project  (500 files, 6 MB of code lines, 50 dll/ocx references, the EXE is 15 MB) and the IDE is very slow.

It can become stalled using 100% CPU for one or two minutes.

I think it's not just about the size of the code because it was not so long one month ago with just a couple of new files since.

This happens at the initial load when i click page down on a code window.
And again when I modify a procedure argument and go to another module and click page down, so I guess he's checking again the syntax of the whole project.
Even with no option to check the syntax or display the dropdown automatically.

I traced the filesystem access and VB6.EXE is not accessing any file when this happens.

What I've tried so far with no success:

- unloading all addins
- checking and unchecking any option I could find in the vb options form
- testing another project with no form/control/ocx
- moving all enums and types in a single class/module (I thought it could reduce dependencies if this slow down the syntax checks)
- defragmenting the drive
- removing unused code

Using VB6 SP5 on W2000, NTFS, plenty of ram available, same problem on 2 different machines

I'm especially looking for hints from people who had a similar problem and found a way to improve the ide speed (something else than splitting the code into several projects !)
0
Comment
Question by:alain_tesio
  • 2
  • 2
  • 2
6 Comments
 
LVL 1

Expert Comment

by:robdogg10
Comment Utility
I'd try the following:

1.  Clear out the TEMP folder.  Not just the system temp folder but also the user temp folder (i.e. C:\Documents and Settings\[UserName]\Local Settings\Temp and C:\Documents and Settings\[UserName]\Local Settings\Temporary Internet Files

2.  Move some classes to separate DLLs and simply reference them.  With 500 files you should be able to break up your project into a ton of separate DLLs.

3.  Uncheck unused references.  Uncheck references that are dependecies of dependencies - your main project does not need it.

4.  If all else fails, rebuild the project from scratch by adding one module at a time.

5.  There maybe an NTFS permission mess.  This means that the underlying OS code has to take extra time for each file to determine permissions.  Make sure you don't have domain users on the permission list for your files.  Actually having a domain user with access to a single file  can slow it down on a sluggish network.

Good luck!
0
 
LVL 6

Expert Comment

by:DominicCronin
Comment Utility
Just a question - why are you against splitting the programme into separate projects. This would usually be what people do. robdogg has suggested this too (point 2)

The reason I'm asking is that I'm rather hoping that your reason for not taking the 'standard' approach could be something that we can solve.

Another question is  - how clean is your registry. Every time you break compatibility you leave loads of old COM entries in the registry. Most serious coding shops use utilities to clean all that up between builds. Having lots of old registry keys will slow you down pretty much more than anything else.

Another approach to solving this is to start with a clean install of your operating system, install your development environment etc and then make an image of the disk. Every so often, check all your code in, restore the image and "get latest" of your sources. That's a lot of hard work, but it will have the desired effect. Still - investing in some registry cleanup tools is probably less painful.
0
 
LVL 2

Author Comment

by:alain_tesio
Comment Utility
Thanks for the replies, I've tried emptying the temp folders and checking NTFS permissions, and I'll look at the registry.

About splitting the project into several DLLs it would certainly help but I'd prefer not to (this is not a problem at all except the IDE efficiency, it's harder to debug code, and I think it would be slower with calls between several dlls than having all classes in the same process, right ?)

I hoped for some less obvious "magic hints" about a known VB weakness like parsing conditional defines or a large number of fragmented files or more than 256 enums or something similar !
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 1

Accepted Solution

by:
robdogg10 earned 500 total points
Comment Utility
>>>About splitting the project into several DLLs it would certainly help but I'd prefer not to (this is not a problem at all except the IDE efficiency, it's harder to debug code, and I think it would be slower with calls between several dlls than having all classes in the same process, right ?)<<<

In one word, NO.  Once objects are in memory there is no difference in speed because everything at that point is just a memory jump.  You may get a bit of a difference (probably nothing that's perceptible to human eye) because the OS has to load more than one DLL.  

As far as debugging code, you normally debug a set of functionality.  If you have logically separated your app into logical sets of functionality (i.e. DLLs), then when debugging you will at most have 2 or 3 DLL projects loaded into the IDE.

As someone else here mentioned, you might want to clean out the registry.  There are several tools that can do that.  

One is Registry Mechanic
http://download.com.com/3000-2094-10190447.html?tag=launch

Registry Magic
http://download.com.com/redir?pid=10234738&merid=87434&mfgid=87434&ltype=dl_elite_dlnow&lop=link&edId=3&siteId=4&oId=3120-2094-10234738&ontId=2094&destUrl=%2F3001-2094-10234738.html

And bunch of others.  This may really help.
0
 
LVL 6

Expert Comment

by:DominicCronin
Comment Utility
It probably helps to know that you can debug straight from one instance of VB to another. I often work with three instances at once in order to debug a multi-tier application from top to bottom
0
 
LVL 2

Author Comment

by:alain_tesio
Comment Utility
Thanks for your replies, no hint (emptying the temporary folders, cleaning the registry, ntfs permissions ...) helped so I'll give points based on what I learned here, that you can load a dll and an exe in the ide
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now