Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do tags written in Java (i.e., extending BodyTagSupport or TagSupport) perform better than .tag files?

At work some developers are changing .tag files into tags that are written in Java. The reason was performance. They stated that there was a ten-fold increase in performance when comparing .tag files and those written in Java. The evidence was empirical.

I'm trying to find some factual data to back this up, but couldn't find any performance comparisons online. I did find documentation that talked about tag pooling and how that can improve performance, but I couldn't find anything comparing the two.

like image 805
Vivin Paliath Avatar asked Nov 04 '22 19:11

Vivin Paliath


2 Answers

the .tag files are supposed to be compiled to java code on first access. So you might have a performance hit just on the first access, afterwards it's supposed to be the same.

You can avoid that by pre-compiling them. The way to setup the pre-compilation varies between servers (see this question for example)

like image 149
Yoni Avatar answered Nov 12 '22 10:11

Yoni


Theoretically speaking, JSP tags (.tag) might cause a performance hit initially, but once executed it should work as fast as a Java based custom tag. Because, JSP tags (.tag) works similar to JSPs.

like image 31
Adeel Ansari Avatar answered Nov 12 '22 10:11

Adeel Ansari