smfoote / tornado

HTML templates with asynchronous rendering, built with JavaScript.
http://smfoote.github.io/tornado/
Apache License 2.0
8 stars 3 forks source link

Slim down compiled templates #60

Closed smfoote closed 9 years ago

smfoote commented 9 years ago

Move a few more methods to the runtime, and remove whitespace in elements where whitespace is not significant

smfoote commented 9 years ago

@jimmyhchan @prashn64 Let me know what you think of this change. I am removing whitespace in elements where whitespace is not significant. The whitespace must include a newline, or it is left alone. The idea is mostly to reduce compiled template file size. Is this too aggressive?

jimmyhchan commented 9 years ago

seems reasonable but sounds like early optimization. thinking about my pull for multiple passes i see this happening as a whitespace removal pass -- that is you need to generate an html syntax tree that can be traversed by a whitespace stripper. just an idea. not sure how reasonable.

smfoote commented 9 years ago

I'm going to wait until your compiler commit is done.

smfoote commented 9 years ago

Will send a new PR using a compiler transform pass.