Re: [CEDET-devel] Performance is Terrible - What do I change?
Brought to you by:
zappo
From: Eric L. <eri...@gm...> - 2012-06-23 01:09:15
|
The obvious bits you tried are pretty quick, so I'll guess you need to break out the profiler. It is easy to do as there is a handy wrapper for it. Use: M-x semantic-elp-<TAB> and there are a few options. Usually, the 'analyze' version will do what you want. Just put the cursor someplace 'slow', and run the command. Save your profile to disk. Browse in the data-debugger. There may be a simple 'aha!' or not. You can email the results to the list if you don't see anything for analysis by others. You might need to restart your Emacs to remove the profiling instrumentation elp leaves behind. Eric On 06/22/2012 08:29 AM, Jake Colman wrote: > Eric, > > First, I should have started off by saying for a wonderful tool. I am > looking forward to getting it and running. Using cedet has been on my > ToDo list for a very long time but I am only now getting around to it. > > Is there a way to force cedet to do a complete parse and not wait for > idle time on doing it on demand? When tells cedet that it has work to > do? The fact that I specified 'ede-cpp-root-project' when emacs started > or the first time I open a file in the project? > > 'semanticdb-find-test-translate-path' took 0.2 seconds. I imagine I > can't get much faster than that! > > 'garbage-collect' went quickly. > > I'm at a bit of a loss. I guess I'll start with the simpler options, > build up from there, and see where it gets me. > > ...Jake > > >>>>>> "EML" == Eric M Ludlam<eri...@gm...> writes: > EML> Hi Jake, > > EML> The first time you try to use any of the smart completion > EML> features, Semantic needs to go off and parse all your source > EML> files. Using GNU Global can help, but that is limited for tasks > EML> like jumping to arbitrary tags. Global does not provide the > EML> details needed to do smart completion or other context related > EML> browsing. > > EML> If you let Semantic first go off and parse all your headers, > EML> which can take minutes in a large system, completions will get > EML> much faster. It will do this in idle time if you leave your > EML> Emacs alone too long. I use CEDET with a very large code base > EML> at work made up of gigabytes of code, and I can get a completion > EML> up in less than a second, and that on a machine several years > EML> ago when I did all the profiling. > > EML> Another possibility is that the include path is so long, it > EML> spends a lot of time just finding headers. The Global options > EML> you enabled should have helped with that. You can verify by > EML> using: > > EML> M-x semanticdb-find-test-translate-path RET > > EML> and see how long it takes. > > EML> One other possibility is that Emacs went off and loaded so many > EML> headers, that it's memory footprint grew past available memory. > EML> This can be a pretty serious problem I have no good solution > EML> for, other than to make sure you don't open too many big > EML> projects at once. You will know this is a problem if you do: > > EML> M-x garbage-collect RET > > EML> and it goes off for a long time. > > EML> Good Luck > EML> Eric > > EML> On 06/21/2012 10:29 PM, Jake Colman wrote: > >> > >> I have a very large C++ source tree. I am trying to see how I can > >> use cedet and all of its great features to create something as > >> good as Eclipse with Java. From all I have read this should be > >> possible but I am having trouble getting there. > >> > >> My primary interest right now is to be able to easily see the > >> methods I can call from a class and to see how it is done. I > >> guess that would be semantic. I also want "intellisense". I > >> think I have things set up correctly but performance is too slow > >> to be useful. > >> > >> I installed GNU Global and ran it across my source tree. The > >> files are created at the root of my project. > >> > >> Here are the relevant settings: > >> > >> (global-ede-mode 1) > >> (semantic-load-enable-gaudy-code-helpers) > >> (global-srecode-minor-mode 1) > >> (require 'semantic-ia) > >> (global-cedet-m3-minor-mode 1) > >> > >> (when (cedet-gnu-global-version-check t) ; Enable support for GNU Global > >> tags database > >> (require 'semanticdb-global) > >> (semanticdb-enable-gnu-global-databases 'c-mode) > >> (semanticdb-enable-gnu-global-databases 'c++-mode)) > >> > >> (defun my-cedet-hook () > >> (local-set-key [(control return)] 'semantic-ia-complete-symbol) > >> (local-set-key "\C-c?" 'semantic-ia-complete-symbol-menu) > >> (local-set-key "\C-c>" 'semantic-complete-analyze-inline) > >> (local-set-key "\C-cp" 'semantic-analyze-proto-impl-toggle) > >> (local-set-key "." 'semantic-complete-self-insert) > >> (local-set-key ">" 'semantic-complete-self-insert)) > >> > >> (add-hook 'c-mode-common-hook 'my-cedet-hook) > >> > >> (setq ede-locate-setup-options > >> '(ede-locate-global > >> ede-locate-base)) > >> > >> (ede-cpp-root-project "PP_666" :file "/builds/mu/PP_666/SRC/Makefile" > >> :include-path '("/lib/MAbs" > >> "/lib/MApi" > >> "/lib/MBase" > >> "/lib/MBO" > >> "/lib/Mdb" > >> "/lib/MDum" > >> "/lib/MDumBase" > >> "/lib/MForecast" > >> "/lib/Mgcc" > >> "/lib/MInterp" > >> "/lib/MLicense" > >> "/lib/MModel" > >> "/lib/MMotif" > >> "/lib/MPerf" > >> "/lib/MPort" > >> "/lib/MQt" > >> "/lib/MQuery" > >> "/lib/MSMP" > >> "/lib/MTables" > >> "/lib/MXml" > >> "/lib/PPImsl" > >> ) > >> :system-include-path '("/usr/include" > >> "/usr/local/include" > >> "/usr/local/omni/include" > >> "/usr/local/roguewave/SourceProEd11" > >> "/usr/local/boost/boost_1_36_0" > >> ) > >> ) > >> > >> > >> The context-sensitive menu is too slow to be of any use. It takes > >> minutes to do anything. semantic-complete-self-insert does not seem to > >> do anything other than be slow. No text or menus show up. The other > >> keystrokes are simply too slow. > >> > >> Is there anything obvious that I am missing? > >> > |