Re: Iterative visiting of all source files
Eric Ludlam <[email protected]> Tue, 07 Apr 2015 21:03:34 -0400
| Newsgroups | gmane.emacs.semantic |
|---|---|
| Message-ID | <[email protected]> |
On 03/27/2015 10:09 AM, RJD wrote: > Eric Ludlam <eric <at> siege-engine.com> writes: > > >> (semanticdb-find-translate-path nil nil) >> >> See its doc for more about what it can do. > > Hi, > > I am now using a front end that uses semantic as a back-end; this is good. > But, I have noticed this for a while now: > > The code base I work with is large. When I open a file in the code base > semantic will parse the buffer and this takes a second or two (it is written > good enough so that if I want to still move the cursor during parsing I can: > that is, Emacs does not freeze). Then, perhaps I move to a class method > (someClass.cpp:someMethod()) and I type the substring of a member of the class: > > _someMem > > Semantic takes anywhere between 10-30 seconds before I get a response > (again, it is interruptible). > > But I do not think this should be happening at all. I expect it to almost be > instant because I have been to this file so many times and there is an > existing "!*!semantic.cache" file for this directory and it saves and gets > updated every time. > > - So why does it takes so long for semantic to give me results even if > there is a db cache? Hi, The first time it tries to do a completion after you start emacs, it will indeed reload your database, but it will also start loading all databases associated with all include files. After that, it will then scan all those databases and build a typecache. It will attempt to do this in idle time, but if you start emacs frequently, and don't get coffee in the meantime, then it will be forced to do it then. You can get a hint of the scope of this task by : M-x semanticdb-typecache-dump RET and expand (using SPC) to see how big the different parts of the cache are. I spend many days profiling and tweaking this process. I'm not sure what is left to tweak out of that code. Without the typecache, all completions are quite slow. Enjoy! Eric ------------------------------------------------------------------------------ BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT Develop your own process in accordance with the BPMN 2 standard Learn Process modeling best practices with Bonita BPM through live exercises http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF