Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] AJDT memory usage

On Monday 19 July 2010 17:44:54 Andy Clement wrote:
> On 19 July 2010 02:10, Emond Papegaaij <emond.papegaaij@xxxxxxxxxx> wrote:
> > Hi,
> > 
> > I've upgraded to the latests snapshot, and enabled the option. Memory
> > usage went down quite a bit, I'd say about 300M. The AjState object I
> > described earlier is now down to 250M. The structureModel is almost
> > completely gone (180K left), the typeMap is still the same. This change
> > makes AJDT a little more usable, but it still takes a huge amount of
> > memory compared to the JDT. With AJDT eclipse takes about 850M after a
> > GC, where with the JDT eclipse only takes about 150M (as indicated by
> > the heap status of eclipse).
> > 
> > I'll leave the option on and report if I find any problems.
> 
> That's great feedback, thanks.  Looks like it is behaving exactly as
> I'd expect (phew!).  Aspect compilation is rather more complex than
> Java compilation, so we will use a little more memory, but of course
> 850M is far too much.  The harder bit of work to support demotion when
> compile time weaving is progressing (which would reduce typemap size),
> but slowly.

I wonder, what does the AspectJ compiler need all that information for? 
Currently, it seems it stores a complete representation of the classes in the 
typeMap, including all constantpool entries. Isn't it possible to drop part of 
this information, for example information like the LineNumberTable and 
LocalVariableTable or maybe even string constants? Although these structures 
are not really large, it could save another 100M, especially when you also 
drop the constant pool entries used by these tables.

Best regards,
Emond Papegaaij


Back to the top