4

我的测试设置:英特尔双核 3GHz、Windows XP 32 位、Emacs 23.2.1、CEDET v1.0(按安装文档中所述进行字节编译)。

Emacs 初始化文件只包含以下四行:

(load "~/vendor/cedet/common/cedet.el")
(semantic-load-enable-code-helpers)
(require 'semantic-ia)
(global-ede-mode 1)

打开仅包含一个函数的 C++ 文件时,通过 (semantic-ia-complete-symbol) 完成该函数仅在明显滞后后完成,即使在重复尝试后也是如此。

评估semantic-analyze-current-context表明,缓慢是由语义分析器引起的。

这是运行几次后的ELP结果文件,没有改变缓冲区中的点。semantic-elp-analyze总经过时间始终约为0.6 秒

当我添加一个包含语句时,例如#include <stdio.h>,时间更改为2.5 seconds。这是相应的ELP 结果

在我的 linux 环境中,相同的基准测试永远不会超过 0.1 秒。(相同的硬件,Debian 的 23.1 Emacs,CEDET v1.0)

任何想法我的设置可能有什么问题?

4

1 回答 1

3

事实证明,编译 CEDET 引发了一堆我一开始没有注意到的错误:

semantic-analyze.el:178:1:Error: Symbol's value as variable is void: filename

导致 81 个文件未编译导致速度下降。

Google 建议此错误可能与 23.1 之后的 Emacs 版本有关。

如果您使用 cedet-build.el 编译 CEDET,请尝试以下解决方法:

Add (setq filename nil) to the beginning of cedet-build.el
于 2011-02-05T10:47:49.743 回答