We have performance problems with the display speed in various templates. While investigating these problems (with the help of FusionReactor 8.7 and other tools) I came across the following problems and I now have a few questions about it:
Problem A:
The FusionReactor “Stream Metrics” show that 3 flushes are always executed for templates in Lucee. I think only 1 flush (like ColdFusion) would be normal.
Question 1:
Why does Lucee need 3 flushes to output the HTML code of a template, while ColdFusion only uses 1 flush?
Problem B:
If, for example, 5 different <cfform> forms are used in a template, 5 requests are made for the “formtag-form.cfm” file, because this file is also integrated 5 times within a JS script tag. Unfortunately, the “formtag-form.cfm” file is not cached by the browser either, which results in completely unnecessary traffic. With ColdFusion, however, the “cfform.js” file is only loaded once, regardless of how many forms with the <cfform> tag are included in the template. In addition, the ColdFusion file “cfform.js” is cached by the browser - I assume because it is recognized as a JavaScript file due to the file extension?
Question 2:
Why is the “formtag-form.cfm” file repeatedly included as a <script> tag for each <cfform> form in the generated HTML? - That doesn’t make sense from my point of view.
Question 3:
Why is the file extension .cfm used for “formtag-form.cfm”, even though it is a JavaScript file? - I assume that the .cfm file extension maybe prevents the script from being cached in the browser?
It would be great if someone could answer my questions.
OS: Debian Linux 9.13
Java Version: 11.0.7
Lucee Version: 5.3.8.178-SNAPSHOT