Re: [CEDET-devel] Slow smart completion with boost
Brought to you by:
zappo
From: David E. <de...@ra...> - 2013-03-25 11:11:14
|
Joe Steeve writes: > I've been trying to get CEDET to work for a while now. Finally I got it > working. And, it IS beautiful :) However, I am facing problems when I > try to use boost. The moment I include a boost header, smart completion > becomes unusably slow. > > My emacs configuration is : http://pastebin.com/RqJf8Cbc > The c++ code I am testing with : http://pastebin.com/CjU7RXYg > The semantic-elp data generated by 'semantic-elp-analyze' right after > the '.' : http://pastebin.com/t61uy35D It is slow the first time, because the typecache has to load and merge all those types. I takes a few seconds on my machine. After that however, I find that completion is fast enough (well under a second). It can take again those few seconds if you complete against new namespaces, like doing a completion against boost::asio:: or similar. But again, after you've done this once, it should be fast again. I'm guessing this is not the case on your machine? Could you do repeated completions on "t." with semantic-analyze-possible-completions and show a timing from later on? When you do that however, you should move the position of the "t." (by adding empty lines before it, for instance), because otherwise the completions will simply come from cache. I also see that you're using auto-complete. It is a nice package, but it is *very* eager to get completions even during the slightest pause in typing. When pulling in completions from Semantic, this can indeed be very annoying. I would advise to tame auto-complete a bit in this regard, by setting `ac-auto-show-menu' and `ac-auto-start' to 'nil' and set `ac-trigger-key' to something like "<tab>". This way, you have to explicitly ask for completions by hitting the TAB key, which I find to be less intrusive. > How do I make it faster? I am willing to live without smart completion > for boost parts. If you remove your Boost system includes in the cpp-root-project, it won't find them. You should also delete everything in your .emacs.d/semanticdb then. Also, out of curiosity, why do you need to add the boost/config.hpp to the preprocessor symbols? -David |