emacs - CEDET 语义分析器在其他快速系统上相当慢

标签 emacs cedet emacs-semantic

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

Emacs init 文件只包含以下四行:

(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 result file运行后 semantic-elp-analyze多次,而不改变缓冲区中的点。总耗时总是大约 0.6 秒 .

当我添加一个包含语句时,比如 #include <stdio.h> ,时间更改为 2.5 秒 .这是相应的 ELP result .

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

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

最佳答案

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

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

其中由于未编译 81 个文件而导致速度变慢。

Google suggests此错误可能与高于 23.1 的 Emacs 版本有关。

如果您使用 cedet-build.el 编译 CEDET,请尝试以下解决方法:
Add (setq filename nil) to the beginning of cedet-build.el

关于emacs - CEDET 语义分析器在其他快速系统上相当慢,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4903573/

相关文章:

c++ - Emacs、Cedet 和语义

emacs - 用语义解析整个项目

Emacs 冰柱空间

javascript - 在 Emacs 中使用 js2 模式正确缩进缓冲区

用于 OpenCV C++ 接口(interface)的 Emacs CEDET

c++ - 在命令行 emacs 中没有使用 cedet 1.1 的自动完成

emacs - 在组织模式下使单词部分斜体

regex - emacs 主要模式为正则表达式之前的行定义字体锁定

Emacs:减轻对鼠标的依赖