Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] Caching of AST units

If you need to create IASTTranslationUnits for a lot of files you need
make sure that you do not hold on to all of these objects, that would
a lot of memory. E.g. the rename refactoring disposes the AST for a file
processing the next file.

There is no caching of ASTs, and I don't think there should be. It is
the indexer's 
task to collect information and to store it in the index for use by
clients. In 
case you have resonable requirements, the index can be enhanced.

Otherwise, I recommend that you cache information that is important to
else where.


> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx 
> [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Dmitry Smirnov
> Sent: Tuesday, October 21, 2008 12:35 PM
> To: CDT General developers list.
> Subject: [cdt-dev] Caching of AST units
> Importance: Low
> Hi,
> while working with a big project, I had found that I need to 
> lookup some set of AST units.
> Typical scenario: I had encountered some name reference in a 
> unit and I need to looup for similar references in other units.
> I have to note that indexer info is not enough for me and I 
> definitely need AST units.
> Creation of AST unit takes significant time, so I'm 
> considering a possibility to create some cache of the 
> frequently used units (alternatively, I could cache only the 
> data I'm interesing in, but caching of units is more general, 
> isn't it?).
> Does CDT already have some kind of caching of this sort?
> Dmitry
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx

Back to the top