Facelets algorithm usually takes almost all spaces in a page and output them directly. The algorithm only trim the spaces on the right, but it doesn't do anything about the spaces/tabs on the left.
Thinking about how to solve this properly, I notice html markup is compiled in a list of Instruction instances, that follows a command pattern to do calls over ResponseWriter. It is possible to use that information and decide when remove all spaces between two elements or when just let one space or line break in between or at the begin/end of the html markup.
This optimization can reduce effectively the amount of information sent to the client with minimal side effects. Anyway, to keep compatibility with the reference implementation (and keep running some tests) we cannot enable this one by default.
The proposal is add an extra element in faces-config file like this:
Suggestions are welcome.