aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
AgeCommit message (Collapse)Author
2019-04-30Sync from internalemcmanus
--- Cache Method objects per template rather than per template evaluation. In a somewhat artificial benchmark, this sped up evaluation by 35%. The benchmark compiles AutoValueTest.java 100 times, and measures how much time was spent by AutoValueProcessor in template evaluation. AutoValueTest.java has 40 @AutoValue classes, and each of those triggers a separate template evaluation. Previously every one of those created a new Method cache (MethodFinder object). Now only the first one (on each iteration of the benchmark) does. Compilation runs will rarely have as many as 40 @AutoValue classes, but they have often have several, so there is still some benefit. According to this benchmark, EscapeVelocity and Apache Velocity now have indistinguishable performance. Internal change: 245835876 --- Avoid excessive reflection overhead by caching the results of method lookups. On an ad-hoc benchmark this improved template evaluation time by 38%. That means that code generators such as AutoValue that use EscapeVelocity should see a substantial speedup. Internal change: 244671738 --- If $foo is a Map then Velocity interprets $foo.bar the same as $foo["bar"]. Previously EscapeVelocity interpreted it the same as for other objects, by looking for a getBar() method (or boolean isBar()). It turns out that autoannotation.vm was depending on the old behaviour, so fix that. Internal change: 244364373
2018-06-06Fix a javadoc error and some warnings.Éamonn McManus
2018-05-29Sync with Google-internal copy.Éamonn McManus
2018-04-20Update to latest Google version of EscapeVelocity.Éamonn McManus
2017-12-27Initial version.Éamonn McManus
This is forked from the code built in to AutoValue, with the following non-trivial changes: (1) Package changed from com.google.auto.value.processor.escapevelocity to com.google.escapevelocity. (2) New pom.xml. (3) Code rewritten to remove Guava dependency, so no shading or diamond dependency problems.