rip747 / Mustache.cfc

{{ mustache }} for ColdFusion
http://mustache.github.com/
MIT License
46 stars 22 forks source link

Performance tweak - caching of ReFindNoCaseValues results #6

Closed markmandel closed 12 years ago

markmandel commented 12 years ago

I set up a cache for ReFindNoCaseValues() so that it didn't have to re-regex the template on each request.

Also tweaked some variable resolution for maximum speed.

rip747 commented 12 years ago

thank you once again!

dswitzer commented 12 years ago

I wonder if the better long term solution would be to add a compiler, instead of always re-interpreting template. Use some a basic lexical parser that converts everything into a token array that we can loop over quickly and process.

I like what a lot of JavaScript templating engines do, they compile the template into executable code--which is slick--but not a great option for ColdFusion.

rip747 commented 12 years ago

that would actually be a good thing to have. you can look at the cfml-liquid project to see how it's done if you need some inspiration.

markmandel commented 12 years ago

Started issue #7 to start talking about a compilation system.