Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [iam-dev] Incremental builder

+1 even if this is only an interim solution!

2009/1/8 Michael Poindexter <staticsnow@xxxxxxxxx>:
> I've been looking at improving the speed of the IAM incremental builder.  It
> looks like much of the time we incur when doing a build is spent rebuilding
> classpaths.  I've got a prototype running locally that makes the following
> changes:
> 1.)  Move the builder out of JDT.  Instead, the builder lives in it's own
> plugin.  All classpath updating and maven invoking is moved out of the
> builder.  The builder plugin exposes an extension point to register
> IBuilderDelegates.  An IBuilderDelegate performs a specific task in response
> to events from the builder.  When the builder runs it diffs the POM, and
> fires events as necessary to registered builder delegates.  The current
> events
> are onParentPomChange, onParentPomReplace, onDependencyPomChange, onDependencyPomReplace, onPomChange, onPomReplace, onResourceChange, onFullBuild.
>  All of the onXXXChange methods are passed an object describing the changes
> made.  I've implemented a ResourceBuilderDelegate to handle our current
> resource processing (in the builder plugin), and a JDTBuilderDelegate (in
> the JDT plugin) to handle classpath updates.
> 2.)  The builder now caches its state on shutdown to avoid rebuilding the
> whole workspace the next startup.
> 3.)  To diff the poms I am using EMF Compare
> (http://www.eclipse.org/modeling/emft/?project=compare) operating on the POM
> model that was created for the POM editor.
> At work I have a pretty large workspace (~40 maven modules) which derive
> from a common base pom, and depend heavily on each other.  Before these
> changes if I made a change in a low level project or the base pom, or on
> startup I was having around 15 minutes of IAM building (ignoring the build
> time JDT had to do).  With this new structure it takes only a minute or two
> in the worst case (changing a dependency version in the base pom that
> effects all projects) (again, ignoring JDT build time in response to
> classpath changes), and very often takes no noticeably longer than a normal
> eclipse build.
> Does this approach seem sound?  What about the new dependency on EMF
> Compare?  I think this simplifies the builder code greatly by allowing
> things like resource modification checking code to be completely separate
> from the classpath updating code.  In addition, this lets us support
> non-Java projects built with maven more easily in the future.  If the
> consensus is that the approach is sound I'll check my changes into a branch
> so everyone can review further as soon as I have time to do so.
> Mike
>
>
> _______________________________________________
> iam-dev mailing list
> iam-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/iam-dev
>
>



-- 
Robert Dale


Back to the top