Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign

Adding 12 cached gcc dirs to parser...

(1/2) > >>

rickg22:
Adding 12 cached gcc dirs to parser...
Adding 12 cached gcc dirs to parser...
Adding 12 cached gcc dirs to parser...

Can someone explain to me why this is called around a million times in the Code completion plugin?

MortenMacFly:

--- Quote from: rickg22 on June 25, 2007, 08:07:34 am ---Can someone explain to me why this is called around a million times in the Code completion plugin?

--- End quote ---
I can (in the end I'm afraid it's my code... ;-):
In early times C::B called the GCC compiler on every (!) project/target it opened to gather the MinGW internal include directories required for the parser. This was very expensive and time consuming. I changed that so that the GCC is called once per C::B session (how likely is it you change the compiler while working with C::B?!). Hence these directories are cached and provided by request (still the parser needs them for every project you open). You can disable the debug message if you like... it's obviously confusing (nativeparser.cpp, line 409). But I'd rather leave the functionality as it is - it works and is fast. ;-)
With regards, Morten.

David Perfors:

--- Quote from: MortenMacFly on June 25, 2007, 09:18:51 am ---But I'd rather leave the functionality as it is - it works and is fast. ;-)

--- End quote ---
Wouldn't it be better (faster, easier) to save the cache to disk...

MortenMacFly:

--- Quote from: mispunt on June 25, 2007, 09:27:31 am ---Wouldn't it be better (faster, easier) to save the cache to disk...

--- End quote ---
Depends on what do you mean by "cache". These GCC dirs are only 12 (in my case even only 4) directory strings in a wxArrayString. For this I wouldn't do a HDD cache...?!
With regards, Morten.

David Perfors:
Well, I thought that the content of those directories where parsed at that stage by the CC plugin. Obviously I was thinking wrong ;) (I must admit, I didn't look into the source code :P)

Navigation

[0] Message Index

[#] Next page

Go to full version