Cross-posting to semantic mailing list.
---------- Forwarded message ----------
From: Ashish Hanwadikar <
Date: Jun 21, 2007 8:03 PM
Subject: using semantic on large projects
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,
;; -*- 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")
(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.
(setq semantic-imenu-auto-rebuild-directory-indexes nil)
;; Get the C parser in due to mode-local bug I just found
;; Post load changes needed for clean workings w/in the linux kernel
'(project unloaded system recursive))
(setq semanticdb-project-roots '("/path/to/the/root/of/my/project"))
(defun semantic-c-mode-hook ()
(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)