Home > aop, tech > Load Time Weaving Memory Usage

Load Time Weaving Memory Usage

I wrote some tests to measure the memory overhead of load-time weaving in AspectJ and AspectWerk. My tests show that the memory required for LTW increases almost linearly for the number of classes loaded (click on the image for a larger version).

aop-memory.jpg

The following tests were run:

  • Baseline with no AOP tool involved (Plain)
  • AspectWerk LTW, with no classes weaved (AW No Weave)
  • AspectJ LTW, with no classes weaved (AJ No Weave)
  • AspectWerkz LTW, with all classes weaved(AW Weave All)
  • AspectJ LTW, with all classes weaved (AJ Weave All)

An interesting observation that can be made from the chart above is that AspectWerkz adds a significant overhead irrespective of whether one uses weaving or not – AspectJ does not seem to have this problem.
AspectJ 1.5.0 and AspectWerkz 2.0 versions were used, and all tests were run on Apple JVM 1.5.0_05.

Two other tests I am planning to run are:

  • Test to compare the effect of number of pointcuts matched on the memory overhead
  • Test to compare the effect of number of classloaders involved

PS: Ron Bodkin mentioned an experimental low-memory-overhead build of AspectJ in one of his blog posts, but I can't find the file anywhere on WWW. Once I have located it, I will run the tests on that build and publish the results.

Advertisements
Categories: aop, tech
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: