Improved Sculptor generator internals (no MWE2-based workflow anymore)

49 views
Skip to first unread message

Torsten Juergeleit

unread,
Jun 26, 2014, 6:44:43 AM6/26/14
to sculptor...@googlegroups.com
The commit #8bd6fab4c0 introduces a few improvements regarding the Sculptor generators internal resource consumption and technical complexity:
  • The formerly separated Guice injectors (the Sculptor DSL one "SculptordslStandaloneSetup" and the template override-aware one "ChainOverrideAwareInjector") are combined in the new injector provided by "SculptorgeneratorSetup.createInjectorAndDoEMFRegistration()". This injector is able to configure objects (like the new Xtend2-based Sculptor generator workflow) which need references to objects from Sculptors DSL parser and Sculptor generators override-aware templates. Using this one-stop-shop injector improves the resource consumption and the performance because the Sculptr DSL Xtext runtime and Sculptor templates are only loaded / wired once.

  • Sculptor generators internal (formerly MWE2-based) workflow is reimplemented with Xtend2 in "org.sculptor.generator.workflow.SculptorGeneratorWorkflow" now. This class is instantiated and wired by the aforementioned new SculptorgeneratorSetup injector. This approach has a few advantages against the old MWE2-approach, e.g.
    • reduced complexity
      • no additional code and dependencies needed for the (also Xtext-based) scripting runtime (the MWE2 workflow description is evaluated and executed for every generator run)
    • reduced resource consumption and better performance
      • fewer executions of Xtext-based DSL parsing -> only Sculptor DSL parsing needed now
      • single Guice injector creation -> SculptordslStandaloneSetup and ChainOverrideAwareInjector (Sculptor template overriding!!!) are combined into a single oen which is created only once (instead of being created in every single MWE2 workflow step again)
    • consistant and "human-readable" logging output -> instead of propagating warnings / errors from within every MWE2 workflow step (via generic "Issues" object and logging obscure stack traces) the warnings / errors are logged directly from within the workflow step with a context-specific log message now

@Ron, how about repeating your performance profiling of Sculptors Maven plugin with the new Xtend-based generator workflow?

/Torsten

Ron Smith

unread,
Jun 28, 2014, 2:16:54 PM6/28/14
to sculptor...@googlegroups.com
The changes sound good.  It'll be nice to not have to use MWE2 and streamline the generation process.

Regarding YourKit, I can go ahead and run profiling again.  Previously I was using an evaluation key, which I don't have now.
YourKit has a free license for open source projects.  We'd have to include a reference to YourKit on the Sculptor web page.
If there's no objections, I can go ahead and contact their sales about getting a license for Sculptor.  I think it'll be useful to periodically profile generation.

--Ron

Torsten Juergeleit

unread,
Jun 28, 2014, 2:34:18 PM6/28/14
to sculptor...@googlegroups.com
I'm glad you like it.

Opting for an open source license of YourKit is a good idea. Please check with YourKit sales if it's sufficient to place a reference to YourKit in the footer of our site, e.g. "© Sculptor Team 2014 with help from Jekyll BootstrapTwitter Bootstrap and YourKit Java profiler".

/Torsten

Ron Smith

unread,
Jul 2, 2014, 5:14:43 PM7/2/14
to sculptor...@googlegroups.com
Am getting an issue with the generator workflow changes and an application that has a couple cyclic dependencies.  Logged issue https://github.com/sculptor/sculptor/issues/136


On Thursday, June 26, 2014 5:44:43 AM UTC-5, Torsten Juergeleit wrote:

Torsten Juergeleit

unread,
Jul 13, 2014, 9:12:15 AM7/13/14
to sculptor...@googlegroups.com
Did the fixing of #136 and improving the workflow logging in #138 help here?

/Torsten
Reply all
Reply to author
Forward
0 new messages