Hi Rich,
That 2.2.3 release is quite old - we are overdue doing another release. You could upgrade to a snapshot and see if that makes any difference (honestly a snapshot passes all the same tests as a release, the only real difference is the label we give the build). But really as long as you are on AspectJ later than 1.6.8 you have the major compiler performance improvements in - but you will be missing IDE improvements. Update site is here:
http://download.eclipse.org/tools/ajdt/43/dev/update
> I wonder if it’s more popular to use aspect with LTW insead of CTW. Perhaps we are approaching this wrong.
Not really, they usually have different use cases. If you can take that weaving cost earlier on, then do so and it won’t impact every startup.
> When profiling and looking at the output I did notice that our project has LOTS of compiler warnings (un-used imports, raw types, type safety, deprecated API calls etc). Would this be adding an extra overhead to AJDT that JDT manages better?
No, that shouldn’t be much different.
> The marker creation times are about 30 sec
I’ll have to double check but I thought this happened asynchronously (so didn’t interfere with you being able to continue working).
> 1.5 times slower?
That isn’t totally unlikely - I need to check out the attachments to review the timings. Seeing a full compile more frequently, now that can be the sign of a bug. A bunch of work has been done to ensure incremental builds are done where possible but if there is a problem in the analysis of whether an incremental is possible, it does fall back on a full build. Basically if you are working on the aspects a full build is more likely but when just working on the regular classes (whether they are affected by aspects or not) you should just be getting incremental builds. If you aren’t we need to look at why and the AJDT event trace view can tell us that - but it can be hard to pick through when there are a lot of projects. I did some work relatively recently to ensure the AJDT event trace view tells us why it is deciding to do full builds - are you able to collect those diagnostics?
> I have attempted to use the non-standard compiler options you mentioned in another blog post.
That’s odd because those should all be on by default now, which is why I didn’t suggest them… hmm. Maybe they weren’t default in that 2.2.3 release of AJDT.
Re: timings.
The timers in your attached profiling doc don’t look too bad:
14:55:47 Pointcut matching cost (total=11505ms for 282774 joinpoint match calls):
14:55:47 Pointcut fast matching cost (total=5816ms for 141848 fast match calls):
but I’ll admit I’ve never seen a pointcut with so many ||s in for the return type before. But it shouldn’t cause a big problem.
I believe the 17731 is telling us how many types the weaver is fast matching against - so all the types in your system and fast matching quickly gets that down to the 700 of interest using your within() clause. And then the join points within those types are subject to slow matching. As you noted the one involving a constructor call() that takes 9 seconds would be much better as execution() of the constructor if you can arrange that.
It feels a bit like this is morphing from a ‘it takes too long’ into a ‘why is it always full building?’ problem. I know I put some improved diagnostics in since that 2.2.3 release for working out why full builds are occurring instead of incremental builds - so it is worth installing a dev build and trying things that should cause incremental builds but cause full. For example, making whitespace changes to non-aspects, that really should only cause incremental builds.
cheers
Andy