Re: Iterative visiting of all source files

Eric Ludlam <[email protected]> Sat, 11 Apr 2015 17:10:49 -0400
Newsgroups gmane.emacs.semantic
Message-ID <[email protected]>
On 04/09/2015 09:37 AM, RJD wrote:
> Eric Ludlam <eric <at> siege-engine.com> writes:
>
>> 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
>>
>>
>
> So when I run said function I get something like this:
>
> ]#<semanticdb-typecache someLocation/to/someFile.cpp>
>     ] Name: "someLocation/to/someFile.cpp"
>     ] Class: #'semanticdb-typecache
>     ] filestream : nil
>     ] includestream #<TAG LIST: 717 entries>
>     ] stream : nil
>     ] dependants #<list o' stuff: 1 entries>
>
> I guess I am just in conflict with how semantic deals with things. I
> strongly believe the WHOLE dbcache should be loaded into memory right at the
> beginning. I do not know if this has anything to do with me not using EDE -
> but I would like a function which I would run in my own adhoc hooks to load
> the relevant dbcaches into memory.

If you want to get all the needed DBs loaded and caches built quickly, 
there are a couple options.

One is to set semantic-idle-scheduler-work-idle-time from 60 seconds to 
5 seconds, basically, something that will get all that stuff gathered up 
early in some idle moment that isn't a minute long.

If you'd like it to do that loading when you load a file, in a mode 
hook, or something like that, you can run 
semantic-idle-work-for-one-buffer, or look at that functions contents 
and pull out the bits you want, which I believe would be these two calls:

(semanticdb-find-translate-path buffer nil)
(semanticdb-typecache-refresh-for-buffer buffer)

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