Just for grins, I inserted <#compress> </#compress> FTL directives in the Party
Manager FTL files to see how much smaller the markup would be. Results:
Before compress - 45k
After compress - 35k
33% less markup.
The drawback is, some of the layout seems to depend on some of the FTL
whitespace, so the page's appearance changed a little.
Adrian Crum wrote:
After spending some time examining the unintentional formatting changes
in my patch files, I discovered that my editor automatically strips off
unnecessary white space at the end of every line. I can't find a way to
shut it off, so I'll have to switch to another IDE.
At first I was upset that my editor would do such a thing without my
permission. Then I got to thinking that it makes a lot of sense. Less
unnecessary white space equals less fluff the compiler has to trudge
through and less fluff in HTML code.
Hey! Wait a second... many of those files that were unintentionally
formatted were FTL files. Does that mean that OFBiz servers are spewing
out unnecessary fluff? I viewed the page source on a typical OFBiz web
page and sure enough - OFBiz's markup has unnecessary white space at the
end of the lines.
Going through all of the FTL files and cleaning them up would be easy to
do with a script or something, but the reduction in HTML output would
be small. Where I see a huge amount of unnecessary markup is with
indentation. Our four character indentation rule results in things like
a simple </div> tag being preceded by twelve to sixteen space
characters. Our servers are working very hard to output nicely indented
markup.