CEDET semantic analyzer is rather slow in the former system

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

The Emacs initialization file consists of only these four lines:

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

When you open a C ++ file that includes only one function, the completion of this function through (semantic-full-character) ends only after a noticeable lag even after repeated attempts.

A semantic-analyze-current-context evaluation shows that slowness is caused by a semantic analyzer.

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

When I add an include statement, for example #include <stdio.h> , the timings change by 2.5 seconds . Here is the corresponding ELP result .

The same tests never take more than 0.1 seconds in my Linux environment. (Same hardware, Debian 23.1 Emacs, CEDET v1.0)

Any ideas what might be wrong in my setup?

+4
source share
1 answer

It turned out that the CEDET compilation threw a bunch of errors that I did not notice at first:

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

Which caused a slowdown, leaving 81 files without compilation.

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

If you use cedet-build.el to compile CEDET, try the following workaround:

 Add (setq filename nil) to the beginning of cedet-build.el 
+3
source

Source: https://habr.com/ru/post/1338505/


All Articles