Finally got around to profiling both validation methods. I looked at memory consumption and execution time.
For memory consumption I looked at the following packages/subpackages.
For APT: org.eclipse.jst.ws.internal.jaxws.core.annotations.validation.* org.eclipse.jdt.apt.* org.eclipse.jdt.core.dom.* (Java DOM/AST)
For WST/EMF Validation: org.eclipse.jst.ws.jaxws.dom.runtime.validation.* org.eclipse.emf.validation.* org.eclipse.jdt.core.dom.*
I set up a workspace starting with one project and scaled up to 10 projects each containing an SEI and Implementation with 2 @java.jws.WebService, 4 @javax.jws.WebMethod, and 8 @javax.jws.WebParam annotations. Results below are using 10 projects. A similar difference in results can been seen from testing one project.
I performed 6 builds without any validation method enabled to get a baseline for memory consumption and then enabled each validation method in turn and repeated the same number of builds.
Result: Baseline for Java DOM/AST org.eclipse.jdt.core.dom.* 63,166 bytes.
APT Validation rules enabled: org.eclipse.jdt.core.dom.* 127,574 bytes org.eclipse.jdt.apt.* 14,247 bytes org.eclipse.jst.ws.internal.jaxws.core.annotations.validation.* 444 bytes Total: 142,265 bytes
WST/EMF validation rules enabled: org.eclipse.jdt.core.dom.* 73,182 bytes org.eclipse.emf.validation.* 11,340 bytes org.eclipse.jst.ws.jaxws.dom.runtime.validation.* 31,412 bytes Total: 115,934 bytes
Difference: 26,331 bytes = 26.41 KB or 0.026 MB
For the execution time test. Same setup as above. But only one project. SEI, Impl, same number of annotations.
For APT i tracked the time in the org.eclipse.jst.ws.internal.jaxws.core.annotations.validation package and for WST/EMF i tracked the following packages:
org.eclipse.jst.ws.jaxws.dom.runtime.validation.webservice; org.eclipse.jst.ws.jaxws.dom.runtime.validation.webparam; org.eclipse.jst.ws.jaxws.dom.runtime.validation.webmethod; org.eclipse.jst.ws.jaxws.dom.runtime.validation.sei; org.eclipse.jst.ws.jaxws.dom.runtime.validation.impl;
The result, an average over 6 builds was APT validation rules 171ms. WST/EMF validation rules 287ms.
Test environment: Mac OSX 10.5.8 Eclipse 3.5.1 with WTP 3.1.1 JProfiler
At this point i'm still leaning towards JDT-APT as the validation method to move forward with.
Shane
New Windows 7: Find the right PC for you. Learn more.
|