Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » How to Profile a JET transform?
How to Profile a JET transform? [message #47078] Wed, 18 June 2008 19:12 Go to next message
Brad Bouldin is currently offline Brad BouldinFriend
Messages: 2
Registered: July 2009
Junior Member
I have a JET transform that operates on a large input file (15MB). It
generates a 20MB output file. The transformation takes about 30 minutes to
run, even when I run it on a fast machine with plenty of RAM (4-core
system, 64-bit Java, with 5GB heap).

Is there any way to run a performance profiler (TPTP? JProbe?) on Eclipse
while the transform is running, to pinpoint where the bulk of time is
Re: How to Profile a JET transform? [message #47167 is a reply to message #47078] Thu, 19 June 2008 13:36 Go to previous message
Paul Elder is currently offline Paul ElderFriend
Messages: 849
Registered: July 2009
Senior Member

The 0.9.0 release of JET (due for release next week) has undergone some
performance improvements. Some notes on the experience and the outcomes:

1) I used YourKit ( as my profiling tool, but I cannot say I
did exhaustive research - it happened to be the tool at hand.

2) With it, I identified a number of key 'hot spots' in JET (which I tried
to remove). Areas of major changes were:

a) Model loading. The EMFXML parser (which translates an XML document into
EMF EObjects) is significantly slower than just using the XML DOM. As a
result, JET 0.9 includes an model loader (org.eclipse.jet.xml) which loads
XML documents via the XML DOM.

b) Writing files to the workspace can be expensive. This is not only due
to the cost of the writing, but also to consequences of it - change
listeners and builders get kicked off. Prior to JET 0.9, JET would always
write a file, even if its contents had not changed. With 0.9, JET checks for
change (by reading the existing file) prior to writing. Despite the extra
cost of reading, the net result is better in the case where many files are

c) Profiling can distorts reality. Whenever I found a hotspot, I would
test changes both with the profiler, and without (just using a stop watch).
Some things that raised a big red flag in profiling had no significant
impact on the stop watch time.

What version of JET are you using? If not 0.9, can you do a test with Ecipse
3.4, EMF 2.4 and JET 0.9?

As for tools that might help with your particular transformation, I'm less
sure. Much of the time in a transformation is spent outside of the Java
classes that represent your templates. A profiler can roll these up into
numbers for the template classes (by default, they start with _jet_). But,
that doesn't really give you much information as to what tags are

I'm all ears for suggestions on how we could make JET transforms more easily
profiled. Some ideas:

* generate tags as methods in the template class. This would make it easier
to allocate blame to individual tags. This is possible so long as the tag
contains no embedded Java code.

Previous Topic:[MOFScript] Problem with metamodel setting in Java integration
Next Topic:Generating OCL from Model
Goto Forum:

Current Time: Tue May 30 05:42:27 GMT 2017

Powered by FUDForum. Page generated in 0.02357 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software