Delphi 2010 中的代码完成速度是否有所提高?

发布于 2024-09-03 00:27:45 字数 516 浏览 6 评论 0原文

我正在使用 Delphi 2009 Pro,只是试图找出为什么我的设置中代码完成速度如此之慢。每当调用代码完成时,IDE 都会锁定长达 30 秒,这确实会中断任何工作流程。
使用 BDS 2006 时,与 Delphi 2009 相比,代码完成速度快得令人难以置信。
阅读这篇文章后,对于Delphi 2009似乎是正常的,但只是关闭自动代码完成不是我想做的事。

我的问题是:
如果我切换到 Delphi 2010,代码完成速度是否会同样缓慢,或者是否会改进到可用的程度?

编辑:
我发现了 IDE 反应迟钝的主要问题。我使用了通过“导入类型库”功能创建的文件 MSHTML_TLB.pas,该文件有 16MB 的代码。扫描此文件以完成代码会使 IDE 冻结长达 30 秒。如果项目中没有该文件,我想说代码完成速度与以前的版本一样快。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

暮年慕年 2024-09-10 00:27:45

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

CnWizzards是一个免费的Delphi IDE开源插件,它为IDE添加了一些改进,如消息框向导、代码统计、代码结构突出显示、<强>改进的代码完成,以及更多...

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...

写下不归期 2024-09-10 00:27:45

不幸的是,没有。 Delphi 2010 并没有变得更快。

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

拥抱我好吗 2024-09-10 00:27:45

我不确定 D2010 是否真的比 D2006 慢。

您是否尝试

  • 清理您的 use 子句,
  • 确保您的路径(lib、搜索)较短并且没有过时的目录/网络链接,
  • 在 dpr 中显式包含所有使用的单元,
  • 重新排序您的 use 子句?

这个想法是让“即时”编译器尽快到达您在代码中的位置。

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.

像你 2024-09-10 00:27:45

我曾经在我的笔记本电脑上和使用网络驱动器时都遇到过这个问题 - 第一次触发代码完成时我会挂起长达 30 秒。

为了解决这个问题,我将正在处理的文件移至本地快速驱动器,问题几乎消失了 - 我仍然遇到挂断,但只持续一两秒,而不是 30 秒!

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!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文