Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Memory Usage =~ k * P * T [ Spring 2.5.6, AspectJ 1.6.5 ]

I've noticed that the number of ReferenceType objects in an
application that uses Spring 2.5.6 PointCuts with AspectJ (1.6.5)
appears to be consistent with the following model:

k * P * T

where:

P is the number of PointCuts defined (15 in my case)
T is the number of Types analysed (4500 in my case)

and k is some overhead per-type analysed (10 in my case).

So, in an application which perhaps 100 types actually need the
pointcut applied, I am carrying a cost of k * P * T ~ 675000
ReferenceType
objects. The * P multiplier appears to result from each PointCut
getting its own ReflectionWorld and hence its own Type map.

I would expect the long term storage consumed by the AspectJ type
analysis to be linear in the number of intercepted types, not the
number of analysed types and ideally some of the type
analysis to be shared between point cuts.

I take it that 1.6.7 might substantially improve this, is that so?

jon.


Back to the top