简体   繁体   English

Delphi 2010中代码完成速度是否提高了?

[英]Is Code Completion speed improved in Delphi 2010?

I am working with Delphi 2009 Pro and just tried to find out why code completion is so slow in my setup. 我正在使用Delphi 2009 Pro,只是试图找出为什么在我的设置中代码完成如此缓慢的原因。 Whenever code completion is invoked, the IDE locks up for up to 30s, which really interrupts any workflow. 每当调用代码完成功能时,IDE最多会锁定30秒,这实际上会中断任何工作流程。
When working with BDS 2006, code completion was incredibly fast compared to Delphi 2009. 与BDS 2006一起使用时,与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. 阅读这篇文章后 ,对于Delphi 2009来说似乎很正常,但是关闭自动代码完成功能并不是我想要的。

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? 如果切换到Delphi 2010,我是否会以相同的慢速完成代码,还是将其改进到可以使用的程度?

EDIT: 编辑:
I found the main problem why my IDE was so unresponsive. 我发现了一个主要问题,为什么我的IDE如此无响应。 I used a file MSHTML_TLB.pas, created through the function "Import a typelibrary", which is 16MB of code. 我使用了文件MSHTML_TLB.pas,该文件是通过“导入类型库”功能创建的,该文件的代码为16MB。 This file being scanned for code completion froze the IDE for up to 30s. 正在扫描此文件以查找代码完成情况,会使IDE冻结30秒。 Without that file being in the project, I'd say code completion is as fast as it was in previous versions. 如果没有该文件在项目中,我会说代码完成速度与以前的版本一样快。

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

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... CnWizzards是Delphi IDE的免费开源插件,它对IDE进行了一些改进,例如消息框向导,代码统计信息,代码结构突出显示, 改进的代码完成等等。

Unfortunately, no. 很不幸的是,不行。 It hasn't gotten any faster in Delphi 2010. 它在Delphi 2010中并没有更快的速度。

I'm not sure it is actually slower in D2010 than in D2006. 我不确定D2010中它的实际速度是否比D2006中慢。

Have you tried to 你有没有尝试过

  • clean up your uses clause, 清理您的使用条款,
  • make sure your paths (lib, search) are short and without obsolete directories/network links, 确保您的路径(lib,搜索)短且没有过时的目录/网络链接,
  • explicitly include all used units in the dpr 在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. 这样做的想法是使“即时”编译器尽快到达代码中的位置。

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. 我以前在笔记本电脑上以及在使用网络驱动器时都遇到此问题-第一次触发代码完成触发时,我可能会挂起长达30秒钟。

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! 为了解决这个问题,我将正在处理的文件移到了本地快速驱动器上,问题几乎消失了-我仍然挂断了电话,但只挂了1秒钟或2秒钟而不是30秒钟!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM