During profiling I found that String.format provides much load on CPU.
In many cases in Tapestry String.format can be easily replaced with simple String concatenation.
Simple JMH (http://openjdk.java.net/projects/code-tools/jmh/) test
shows, that concatenation is 366 times faster.
I removed only hot places in tapestry and get following results with apache benchmark:
Not patched tapestry version:
Requests per second: 21.38 /sec (mean)
Time per request: 46.764 [ms] (mean)
Patched tapestry version:
Requests per second: 27.77 /sec (mean)
Time per request: 36.013 [ms] (mean)
So we gained 10ms per request or 20% of rendering time.
If you don't mind I would like to get rid of String.format in all places of Tapestry and provide patch. I fixed only hot places which appeared during ab-profiling of one concrete page. So it is very likely that not all hot places were found and fixed.