views:

595

answers:

4

I am working with Delphi 2009 Pro and just tried to find out why code completion is so slow in my setup. Whenever code completion is invoked, the IDE locks up for up to 30s, which really interrupts any workflow.
When working with BDS 2006, code completion was incredibly fast compared to Delphi 2009.
After reading this post it seems to be normal for Delphi 2009, but just turning off the automatic code completion is not anything I want to do.

My question is:
If I switch to Delphi 2010, will I have the same slow speed for code completion or was it improved to a point to be usable?

EDIT:
I found the main problem why my IDE was so unresponsive. I used a file MSHTML_TLB.pas, created through the function "Import a typelibrary", which is 16MB of code. This file being scanned for code completion froze the IDE for up to 30s. Without that file being in the project, I'd say code completion is as fast as it was in previous versions.

+4  A: 

Try CnWizards http://www.cnpack.org/showlist.php?id=39&lang=en

CnWizzards is an free open-source plugin for Delphi IDE, it adds several improvements to the IDE, like, messagebox wizard, code statistics, code structure highlight, improved code completion, and many more...

arthurprs
-1 for a useless link to a page of non-descriptive download links. Could be anything. Could be useful, could be NSFW, could be malware, there's no telling.
Chris Thornton
I know that cnWizards is not malware. It is a useful addon for Delphi.
Roland Bengtsson
I gave this -1 because I generally do not like 3rd-party solutions, *especially* if the answer in no way answers the given question: Is D2010 faster than D2009?
Andreas Rejbrand
i was just trying to help....
arthurprs
+1 Although the answer is not directly related to the question: "Is Code Completion speed improved in Delphi 2010?", it is clear that the user is looking for a faster code completion solution, and CnWizards provides this. Code Completion provided by CnWizard is much faster than Delphi's default implementation, and its auto invoke features works much better. Also it works on a broader range of identifiers, and can search for the entered word even if it is in the middle of identifier name, not just beginning. Delphi's own code completion is a piece of crap in compare to CnWizard's.
vcldeveloper
OK, I removed my -1.
Andreas Rejbrand
I tried cnWizard for a few days and it works MUCH better than the Code Completion of Delphi. Thanks a lot for the link. Of course, it would be much better if the built in feature would be improved, since we have to deal with it every minute of our (programmers-) life.
Holgerwa
+4  A: 

Unfortunately, no. It hasn't gotten any faster in Delphi 2010.

Mason Wheeler
That is a pity, I use D2007 and I regularly have long freezes around 30 seconds for code completion. Also things like when write method-name and type '(' it may freeze for a long time. The project has around 1,5 millions source lines and hundreds of source files.I use D2007 and I have sometimes thought of create a new project and add a source file one by one to maybe clean it up and make it faster.But it may never happens due to lack of time and it may even not improve performance...
Roland Bengtsson
Yeah, the open parenthesis thing is particularly annoying. You can disable that under Tools->Options->Editor Options->Code Insight. Then it will only give you parameter help if you invoke it with CTRL-SHIFT-SPACE.
Mason Wheeler
+2  A: 

I'm not sure it is actually slower in D2010 than in D2006.

Have you tried to

  • clean up your uses clause,
  • make sure your paths (lib, search) are short and without obsolete directories/network links,
  • explicitly include all used units in the dpr
  • reorder your uses clause?

The idea is to make the "on-the-fly" compiler arrive at your position in code as quickly as possible.

François
This is delphi compared with delphi, so this is already compared with the same settings for D2006 and d2009/d2010. I share the OP's problem with my d2009. It sometimes locks up where d2006 didn't, or not as long.
Marco van de Voort
And you guarantee that you have the same project with the same uses and same paths? In my experience, switching to newer version of Delphi goes often with other modifications that are rarely without side effects.
François
+2  A: 

I used to have this problem both on my laptop, and when I was using network drives - I would get a hang for up to 30s the first time code completion was triggered.

To counter this, I moved the files I was working on to a local fast drive and the problem almost went away - I still had a hangup, but only for a second or 2 instead of 30!

MarkRobinson