Question

My test setup: Intel Dual Core 3GHz, Windows XP 32 bit, Emacs 23.2.1, CEDET v1.0 (byte-compiled as described in the INSTALL docs).

The Emacs init file only consists of these four lines:

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

When opening a C++ file that includes just one function, completing that one function via (semantic-ia-complete-symbol) finishes only after a noticable lag, even after repeated tries.

Evaluating semantic-analyze-current-context shows that the sluggishness is caused by the Semantic analyzer.

Here's the ELP result file after running semantic-elp-analyze several times, without changing the point in the buffer. The total elapsed time is always about 0.6 seconds.

When I add an include statement, like #include <stdio.h>, the timings change to 2.5 seconds. Here's a corresponding ELP result.

The same benchmarks never take longer than 0.1 seconds in my linux environment. (Same hardware, Debian's 23.1 Emacs, CEDET v1.0)

Any ideas what could be wrong with my setup?

Was it helpful?

Solution

It turned out that compiling CEDET threw a bunch of errors I didn't notice at first:

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

Which caused the slowdown by leaving 81 files uncompiled.

Google suggests this error might be related to Emacs versions newer than 23.1.

If you use cedet-build.el for compiling CEDET, try the following workaround:

Add (setq filename nil) to the beginning of cedet-build.el
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top