|Re: [JET] Enhancement: public void generate(PrintStream stream, Object argument) [message #431747 is a reply to message #431717]
||Thu, 23 July 2009 16:02
| Ed Merks
Registered: July 2009
It would be better to enhance JET2, but if the changes are simple, I'd
certainly be willing to incorporate them in the older JET1 base.
Gregor Pfeifer wrote:
> First of all I must say: EMF rocks. I'm writing a compiler and trying
> out EMF by using it to model my AST objects. First I was sceptic, but
> now I'm excited, because EMF saves me a lot of work.
> For the code generation part I use JET. In my scenario, a template can
> call other templates recursively. The current interface of a JET
> template is:
> public String generate(Object argument)
> With this interface I have a massive perfomance (and memory) problem,
> since every call of a template creates a String. I have extended JET
> so that a template can optionally be generated with another interface.
> public void generate(PrintStream stream, Object argument)
> With this new interface the templates are directly written into one
> single stream without generating lots of temporary Strings. Now my
> compiler takes just seconds instead of more than 20 minutes to
> generate about 10 MB code. I would like to contribute my changes:
> Any comments?
> With very best regards
Professional Support: https://www.macromodeling.com/
Powered by FUDForum
. Page generated in 0.02122 seconds