[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.m2m] Re: [QVTO] Transformation performance degradation

I have edited the original message on the forums adding the code demonstrating the issues, but it looks like edits are not propageted to the newsgroups, so here it is again:

import emf.tools;
modeltype Ecore "strict" uses 'http://www.eclipse.org/emf/2002/Ecore';

transformation test(out model : Ecore);

main() {
var start := this.currentTimeMillis();
var i:= 0, s := this.currentTimeMillis();
while(i<20000) {
i := i + 1;
i.map ToClass();
if i.mod(2000)=0 then {
log('Last 2000 took ' + (this.currentTimeMillis()-s).toString() + ' ms');
s := this.currentTimeMillis();
} endif;
};
log('Total: ' + (this.currentTimeMillis()-start).toString() + ' ms');
}


mapping Integer::ToClass() : EClass
{
   name := 'c' + self.toString();
}