sebastianbenz / Jnario

Executable specifications for Java
136 stars 38 forks source link

Speed up compilation of specs when there are .suites in the project #153

Closed timw closed 9 years ago

timw commented 9 years ago

Currently any change to any specification (.spec/.feature/.suite) will trigger compilation of all .suite files, which becomes combinatorial (.spec -> all .suites -> all .suites etc.)

In the Jnario tests, this causes a build that can take up to a minute on any .spec save (which blocks test running).

This change:

Downside is the fix involves snooping on internals to identify the ResourceSet to load objects from (so spec names/declaring types and PatternReferences can be resolved). It has to be the actual ResourceSet the changes from from otherwise you can get stale objects (i.e. with non-existent PatternReferences) and exceptions loading objects.

Typical build times with this change in the Jnario tests are:

sebastianbenz commented 9 years ago

Very nice!

sebastianbenz commented 9 years ago

I note, I moved the custom ResourceDescriptionMananger to the ui plugin as it requires a dependency to org.eclipse.xtext.builder