For most applications the time spent in generating the outputs of their views is small and therefore any improvement in this aspect will be negligible.
For applications sensitive to that time, freemarker-tags has been redesigned, improving its performance. In version 0.7.0 of the plugin, the rendering speed of Grails Tag Libraries in a FTL template, is very close to that of a compiled GSP page:
A) quick_start application started using ‘grails prod run-war’ and tested using ‘ab-n 3000-c 30 url’
#request/second (mean)
freemarker-tags-0.6.1
list: 165.99 #/sec, 403.29 #/sec, 448.74 #/sec, 421.15 #/sec
create: 201.49 #/sec, 407.45 #/sec, 449.79 #/sec, 436.02 #/sec
show: 231.39 #/sec, 428.36 #/sec, 496.63 #/sec, 468.14 #/sec
edit: 186.29 #/sec, 348.25 #/sec, 388.07 #/sec, 372.15 #/sec
gsp
list: 248.94 #/sec, 714.39 #/sec, 777.56 #/sec, 688.66 #/sec
create: 251.24 #/sec, 712.82 #/sec, 891.65 #/sec, 813.68 #/sec
show: 250.04 #/sec, 742.08 #/sec, 990.49 #/sec, 918.49 #/sec
edit: 230.59 #/sec, 720.73 #/sec, 903.11 #/sec, 783.17 #/sec
freemarker-tags-0.7.0
list: 222.27 #/sec, 670.82 #/sec, 720.34 #/sec, 627.70 #/sec
create: 218.92 #/sec, 618.93 #/sec, 750.98 #/sec, 695.02 #/sec
show: 250.08 #/sec, 786.39 #/sec, 1040.83 #/sec, 878.74 #/sec
edit: 211.43 #/sec, 636.35 #/sec, 823.98 #/sec, 757.29 #/sec
In particular situations, the performance of a FTL template will be even better than a GSP page, thanks to FreeMarker itself:
Continue reading →