Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] CDT performance

Hi all.

Can anybody say whether the following things (related to CDT
parformance) were discussed ?

1. CModel optimization: currently, whole C file is parsed after each
change in editor.
   May be it's reasonable to re-parse changed fragment only. 
   Problem: even if 1 char changed, whole code structure can be affected
in some cases.
   Mean to resolve: if we are "not sure", we can re-parse whole file,
like now. In worst case,
   we'll have the same situation as now (additional checks seem to be
low-weight).

2. Store source files (expecially common includes) in some "half-parsed"
format.
   In general, 
     - create "mirror" directory (possibly on fastest hard disc, unlike
slow network CVS devices)
     - for each original source file, create corresponding mirror file,
which should contain:
         - macros definitions
         - includes definitions
         - token objects
         - unresolved macros  
         - specific records for #ifdef / #if / ... statements
   When scanner references some source file, we can check whether mirror
file is newer
   than original one. If so, we can use mirror file - so, no need to do
scanning again: we
   are skipping most of scanner activity (char-by char text analyse) 
   Disadvantage: need to write mirror file after each source change.
   May be, it's reasonable to enable mirroring for specific directories
only (system includes,
   which are not intended for change but referenced multiple times from
different sources).

I'm investigating these things now, but may be somebody have already
worked with it ?
-----------------------------------
With best regards, Oleg Krasilnikov
Software designer, Eclipse team. 
Intel corp.
+7 8312 162 444 ext. 2587 
(Russia, Nizhny Novgorod)


Back to the top