jreijn / spring-comparing-template-engines

Demo project to show different Java templating engines in combination with Spring MVC
Apache License 2.0
422 stars 116 forks source link

Add Rocker to benchmark #40

Closed zonaut closed 5 years ago

zonaut commented 5 years ago

Rocker claims to outperform most of the template engines. It would be nice to see reproduced here. https://github.com/fizzed/rocker

Vest commented 5 years ago

Yes, looks interesting, but the thing is:

The Rocker parser will generate a Java source file for each template.

I do not expect it to be (much) slower than JSP. If I can integrate the template engine into the Spring container, I will update the issue.

zonaut commented 5 years ago

Yes, I would expect it to be close to JSP also. Most benchmarks gave me almost the same measured time. I am running these on a linux box so that seems to produce different (better) results in most cases. For me the interesting part would be to see how much memory consumption there was while doing these benchmarks.

Vest commented 5 years ago

I have updated the project recently with HtmlFlow. You can have a look at it, by the way. Regarding the memory consumption, I cannot help you there. This project consumes over 1 GB just right after the start :) I am even considering about splitting it to smaller projects. Eventually many libraries are very old. I will try to play with Rocket in the nearest... future... years :) No promises, as usual.

Vest commented 5 years ago

The issue is resolved with PR #45. You can test it now.

Rocker is an inconvenient framework for testing, if you use Eclipse. Because it requires the template preprocessing, compiling etc.