Jump to: navigation, search

Difference between revisions of "Xpand/New And Noteworthy"

(General)
Line 1: Line 1:
= Version 1.3.0 (Kepler) =
+
= Version 1.3.0 (Kepler) =
  
=== General ===
+
=== General ===
  
Xpand 1.3.0 will be part of the [http://wiki.eclipse.org/Kepler/Simultaneous_Release_Plan Eclipse Kepler Simultaneous Release].
+
Xpand 1.3.0 will be part of the [http://wiki.eclipse.org/Kepler/Simultaneous_Release_Plan Eclipse Kepler Simultaneous Release].  
  
Main focus in this Xpand release is performance and memory optimization.
+
Main focus in this Xpand release is performance and memory optimization.  
  
=== Changes ===
+
=== Changes ===
  
 
*[https://bugs.eclipse.org/bugs/buglist.cgi?f1=OP&list_id=4475286&f0=OP&classification=Modeling&f4=CP&chfield=resolution&query_format=advanced&chfieldfrom=2012-05-03&f3=CP&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&component=Xpand&product=M2T Bugzilla Report] ([https://bugs.eclipse.org/bugs/buglist.cgi?f1=OP&list_id=4475304&f0=OP&classification=Modeling&f4=CP&chfieldto=2012-12-22&chfield=resolution&query_format=advanced&chfieldfrom=2012-05-03&f3=CP&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&component=Xpand&product=M2T M4] [https://bugs.eclipse.org/bugs/buglist.cgi?f1=OP&list_id=4475327&f0=OP&classification=Modeling&f4=CP&chfieldto=2013-02-26&chfield=resolution&query_format=advanced&chfieldfrom=2012-12-23&f3=CP&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&component=Xpand&product=M2T M6])
 
*[https://bugs.eclipse.org/bugs/buglist.cgi?f1=OP&list_id=4475286&f0=OP&classification=Modeling&f4=CP&chfield=resolution&query_format=advanced&chfieldfrom=2012-05-03&f3=CP&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&component=Xpand&product=M2T Bugzilla Report] ([https://bugs.eclipse.org/bugs/buglist.cgi?f1=OP&list_id=4475304&f0=OP&classification=Modeling&f4=CP&chfieldto=2012-12-22&chfield=resolution&query_format=advanced&chfieldfrom=2012-05-03&f3=CP&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&component=Xpand&product=M2T M4] [https://bugs.eclipse.org/bugs/buglist.cgi?f1=OP&list_id=4475327&f0=OP&classification=Modeling&f4=CP&chfieldto=2013-02-26&chfield=resolution&query_format=advanced&chfieldfrom=2012-12-23&f3=CP&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&component=Xpand&product=M2T M6])
 +
 +
== Performance ==
 +
 +
Xpand is used in large-scale projects, where overall performance is crucial. For the Kepler release Xpand has been intensively profiled to identify performance hot spots. Performance is meant in both execution performance as well as memory usage. Often the optimization on the one side reduces the performance on the other side: accelerating execution performance often uses caching, which increases memory usage, and vice-versa, reducing memory consumption requires more processing time. It has been taken into account that the performance gain pays off the downside. Sometimes performance could be improved in both ways, e.g. when garbage collection is performed less when unneccessary memory allocation is avoided, this also is positive for the execution performance.
 +
 +
=== Parser Optimization ===
 +
 +
The ANTLR based parser grammars have been refactored to perform better.
 +
 +
=== AST Optimization ===
 +
 +
The AST classes (*.internal.*.ast.*) usually maintain lists or arrays of other AST elements. When these collections are empty, the instance field will be assigned to a constant empty array or collection. This avoids the unneccessary instantiation and references to empty collections.
  
 
= Version 1.2.1 (Juno)<br> =
 
= Version 1.2.1 (Juno)<br> =

Revision as of 12:15, 20 February 2013

Version 1.3.0 (Kepler)

General

Xpand 1.3.0 will be part of the Eclipse Kepler Simultaneous Release.

Main focus in this Xpand release is performance and memory optimization.

Changes

Performance

Xpand is used in large-scale projects, where overall performance is crucial. For the Kepler release Xpand has been intensively profiled to identify performance hot spots. Performance is meant in both execution performance as well as memory usage. Often the optimization on the one side reduces the performance on the other side: accelerating execution performance often uses caching, which increases memory usage, and vice-versa, reducing memory consumption requires more processing time. It has been taken into account that the performance gain pays off the downside. Sometimes performance could be improved in both ways, e.g. when garbage collection is performed less when unneccessary memory allocation is avoided, this also is positive for the execution performance.

Parser Optimization

The ANTLR based parser grammars have been refactored to perform better.

AST Optimization

The AST classes (*.internal.*.ast.*) usually maintain lists or arrays of other AST elements. When these collections are empty, the instance field will be assigned to a constant empty array or collection. This avoids the unneccessary instantiation and references to empty collections.

Version 1.2.1 (Juno)

General

Xpand 1.2.1 is a maintnance release and was released with Eclipse Juno.

Changes

Bugzilla Report (33 issues resolved)

Version 1.1.0 (Indigo)

General

Xpand 1.1.0 is a maintnance release and was released with Eclipse Indigo.

Changes

Version 1.0.0 (Helios)

General

Xpand 1.0.0 is the first graduated release at Eclipse and was released with Eclipse Helios.

Changes

Incremental Generation

Xpand is now shipped with an optional incremental generation facility. This works very similar to the incremental Java compiler in Eclipse. It detects which parts of a model have changed since the last generation process. It then determines which files need to be generated due to that change and which are unaffected by it. Only the former are the regenerated, while the latter remain untouched.

Big models benefit from this feature. The generation of models with 1000 elements takes 50% of the time without incremental generation.

Backend

In large projects, generator speed is an issue, and the backend is designed with performance in mind. This requirement is what actually sparked its development in the first place. For performance and/or obfuscation reasons, the backend will serve as a basis for compilation into Java classes.

The design was driven by the following forces:

  1. Performance
  2. Compiler
  3. Language independence
  4. Independent of parse tree
  5. Language interoperability
  6. Reuse of Tooling

Profiler

Xpand provides profiler facilities by defining a profiling component. An example workflow using the profiler is shipped with the generator sample project (generatorWithProfiler.mwe).

XpandProfiler.png

Editor

A lot of enhancements are done for the Xpand editors.

  1. The navigation of the Xpand editors is improved by more specific navigation proposals
  2. Extension imports are now hyperlinks to the extension files
  3. The Xpand project wizard allows a more detailed project configuration
  4. A lot of other enchantments like markers for missing/not existing metamodels
XpandProjectWizard.png

Further improvements

  1. ONFILECLOSE: The ONFILECLOSE keyword is added to the EXPAND statement and allows a deferred evaluation of the EXPAND statement. The evaluation of the EXPAND statement is deferred until the FILE statement is closed.
  2. Java extensions: Since Xpand 0.8.0 non-static Java method can be called from Xtend.

Version 0.7.0 (Galileo)

General

The 0.7.0 version of the Xpand component from M2T is the first official Eclipse release of it. Xpand is a statically typed template language, featuring polymorphic dispatch, extensions and an open pluggable type system. It comes with Eclipse-based IDE support.

Xpand has previously been a part of openArchitectureWare and is used in many big projects and also shipped with some commercial products.

Changes

Performance

For the 0.7.0 release, the team has done some major performance improvements. Not only the runtime is up to 60% faster but due to aggressive caching we were able to improve the performance of the static analysis in the IDE about 400%.

IDE features

As this is the first release at Eclipse, some of the UI-features are outlined here.

File decorations

When you open Eclipse and import a project into the workspace you can see several file decorating images.

XpandFileImages.jpg

There are specific images for

  • Xpand2 templates (.xpt extension)
  • Extension files (.ext extension)
  • Check constraints (.chk extension)

Editors

When you double-click on one of the above mentioned file types, special editors will open that provide appropriate syntax coloring. Syntax coloring

Here are examples for the Xpand editor:

XpandCodeHighlighting.jpg

for the Extensions editor:

XtendCodeHighlighting.jpg

and for Check editor:

CheckCodeHighlighting.jpg

Code completion

The Editors provide extensive code completion support by pressing Ctrl + Space similar to what is known from the Java editor. Available types, properties, and operation, as well as extensions from .ext files will be found. The Xpand editor provides additionally support for the Xpand language statements. Xpand tag delimiter creation support.

XpandCodeCompletion.jpg

In the Xpand editor there is an additional keystroke available to create the opening and closing tag brackets, the guillemets ("«" and "»").

Ctrl + < creates "«"

and

Ctrl + > creates "»"