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

The reason why I need the AST is that I deal a lot with macro(s). It
looks like index does not allow this. Most of the problems I had
encountered were posted here.
I'm afraid I cannot wait for indexer support due to my project timeframe.

BTW, I'm considering the JCS as a cache implementation
(http://jakarta.apache.org/jcs/index.html). I suppose I will be able
to limit the memory consumed by cached units (at least the number of
units in the cache).

Dmitry

2008/10/21 Schorn, Markus <Markus.Schorn@xxxxxxxxxxxxx>:
> Dimitry,
> If you need to create IASTTranslationUnits for a lot of files you need
> to
> make sure that you do not hold on to all of these objects, that would
> consume
> a lot of memory. E.g. the rename refactoring disposes the AST for a file
> before
> 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
> you,
> else where.
>
> Markus.
>
>> -----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
>> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>>
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>


Back to the top