RE: [aspectwerkz-user] Speeding up roundtrip

Mattias Jiderhamn <[email protected]> Thu, 24 Nov 2005 08:43:13 +0100
Newsgroups gmane.comp.java.aspectwerkz.user
Message-ID <[email protected]>
[Bringing an old thread to life again...]

Since we discussed this I have tried the other 
approach; trying to find out why the online 
weaving is so slow. It was a bit hard since I'm 
not very used to profiling and Alexandre has 
limited insight in our environment and application.

Recently I also added Hibernate to the project, 
which adds to the reloading time even furhter. 
Therefore I am now eager to try other alternatives.

Atif, could you post to the list the javac 
wrapper you were talkning about, and an Ant file with usage example?
If it works for me, we can try to refine it and 
then contribute it to the AW project.

In my dreams I would also like to create an IDE 
plugin, that does automatic "post compile 
weaving" after compiling classes in IntelliJ.
But for now, an Ant task that only (compiles and) 
weaves changed classes would be great.

Thanks in advance,

   Mattias Jiderhamn

At 2005-06-22 15:24, Khan, Atif (Matrix) wrote:
>Let me clarify my environment a little.
>
>My Eclipse IDE doesn't weave the classes using 
>AspectWerkz. It uses a separate directory for 
>classes. We use ANT scripts to do out builds for 
>different environments and that's where we use 
>Aspectwerkz and compile time weaving.
>
>Regards
>Atif Khan
>
>
>----------
>From: Mattias Jiderhamn [mailto:[email protected]]
>Sent: Wednesday, June 22, 2005 4:05 AM
>To: [email protected]
>Subject: RE: [aspectwerkz-user] Speeding up roundtrip
>
>So your project still compiles against the weaved classes?
>My experience is that I have to recompile all 
>classes, or I will get compilation errors.
>But honestly, when I try to recreate this to 
>post the error it works just fine. I will get 
>back to you if the problem reappears.
>
>At 2005-06-21 16:56, you wrote:
>>I can definitely share this. I am just not sure 
>>how do I do that. Is this something that I can 
>>contribute to the base of AspectWerkz?
>>
>>I do not use a different output directory. So, 
>>I don't have to copy any classes. Only the 
>>classes written to the text file by JAVAC task 
>>are weaved by the AspectWerkzCTask.
>>
>>Regards
>>Atif Khan
>>
>>
>>----------
>>From: Mattias Jiderhamn [ mailto:[email protected]]
>>Sent: Tuesday, June 21, 2005 10:12 AM
>>To: [email protected]
>>Subject: RE: [aspectwerkz-user] Speeding up roundtrip
>>
>>Interresting. Is this something you would like to share?
>>
>>Have you also made AspectWerkzC use a different 
>>output directory, or do you make a copy of all 
>>the (modified) class files first, so that you 
>>don't have to recompile all classes next time?
>>
>>At 2005-06-21 15:13, you wrote:
>>
>>>We had the same issue. Our codebase is really 
>>>big. So, what I did was to override the 
>>>"javac" ANT task to write the file list to a 
>>>text file. Since javac already checks for the 
>>>timestamps, it only compiles the modified 
>>>classes. This way I have a list of only 
>>>modified classes. I then extended the 
>>>AspectwerkzCTask to read the files from this 
>>>text file and AOP compile them. This way I 
>>>don't have to weave the whole codebase evrytime.
>>>
>>>Regards
>>>Atif Khan
>>>
>>>-----Original Message-----
>>>From: Alexandre Vasseur 
>>>[<mailto:[email protected]>mailto:[email protected]]
>>>Sent: Tuesday, June 21, 2005 7:04 AM
>>>To: [email protected]
>>>Subject: Re: [aspectwerkz-user] Speeding up roundtrip
>>>
>>>Hi
>>>
>>>...
>>>
>>>AspectWerkzC does not support writing to a different location.
>>>On the other hand you may be able to implement 
>>>a wrapper that checks for .class file 
>>>timestamps to compile only modified files 
>>>(then keep track of the lastRun timestamp in some per project file)
>>>
>>>Alex
>>>
>>>On 6/21/05, Mattias Jiderhamn <[email protected]> wrote:
>>> > Our application is big enough to require a few minutes of offline
>>> > weaving on my machine, so we use online weaving in development. On the
>>> > other hand, reloading the application in the web container using
>>> > online weaving isn't much better (say ½-1 minute). This makes
>>> > developing very slow, since the code-compile-test cycle has a lot of
>>> > weaving overhead.
>>> >
>>> > Is there any better way to do this? Can I have AspectWerkz weave only
>>> > modified classes offline?
>>> > If I weave the whole project and then try to compile in my IDE
>>> > (IntelliJ), I get compiler errors. Could I make AspectWerkzC output
>>> > the weaved files in a different directory, so that I can compile from
>>> > the IDE and then have AspectWerkz weave the modified classes only?
>>> >
>>> > Thanks in advance,
>>> >    Mattias Jiderhamn