I am trying to setup semantic intellisense for a large project (possibly more than 1000 files). It is extremely slow and thus, unusable in the current state. The relevant .emacs is at the end of this email. I found out using 'strace' that it is trying to locate the include file (say, include <b/a.h>) in my project. The algorithm seems to be the following:
1) try, current directory/b/a.h -- Not found
2) then, current directory/a.h -- Not found
3) the, for each subdirectory in the system include path, try, system include dir/subdir/b/a.h -- Not found

The last step, takes a lot of time as it has to through hundreds of sub directories. Just like the step 1), why doesn't it directly try, system include dir/b/a.h? It will find that file immediately.

I don't know enough lisp to fix this. But if somebody can point to me where I should be looking for, I am willing to give it a try.

thanks in advance,
Ashish Hanwadikar

;; -*- emacs-lisp -*-

;; Pre-define some values so we don't intersect w/ my regular setup
(setq semanticdb-default-save-directory (expand-file-name "~/.semanticdb-test")
      semanticdb-default-file-name "semantic-test.cache "
      semanticdb-default-system-save-directory semanticdb-default-save-directory)

(add-to-list 'load-path "~/downloads/cedet")
(add-to-list 'load-path "~/downloads/cedet/semantic")
(add-to-list 'load-path "~/downloads/cedet/common")

;; Default CEDET setup.
(load-file "~/downloads/cedet/common/cedet.el")
(load-file "~/downloads/cedet/semantic/semantic- load.el")
(setq semantic-imenu-auto-rebuild-directory-indexes nil)

;; Get the C parser in due to mode-local bug I just found
(require 'semantic-c)

;; Post load changes needed for clean workings w/in the linux kernel
(setq-mode-local c-mode
         '(project unloaded system recursive))

(setq semanticdb-project-roots '("/path/to/the/root/of/my/project"))

(defun semantic-c-mode-hook ()
       (semantic-add-system-include "/path/to/the/root/of/my/project/src/include")

(add-hook 'c-mode-common-hook 'semantic-c-mode-hook)
(add-hook 'c-mode-hook 'semantic-c-mode-hook)
(add-hook 'c-mode-common-hook 'semantic-default-c-setup)

(global-semantic-idle-completions-mode 1)
(require 'semantic-ia)
(require 'semantic-analyze)

Ashish Hanwadikar
Web: http://ashish.typepad.com/ashishs_niti