[Cppcms-users] About raw filter translation.
Brought to you by:
artyom-beilis
From: redred77 <red...@gm...> - 2015-07-04 17:09:22
|
Hi It seems like raw filter in view template does nothing but just wraps input variable. So below two lines are just same. out()<<cppcms::filters::raw(content.hello); out()<<content.hello; First one looks more structured which seems like to follow rules like other filters. But isn't it better for cppcms_tmpl_cc.py to translate like the second one in a performance aspect view? I know CppCMS is fast enough but don't want to waste CPU cycle for these reasons. 1. This logic is not necessary at all. 2. Translated result cpp is not intended to view or edit for human. It can be optimized more. 3. I use raw filter far many times. More than escape filter. 4. Maybe I'm too obsessed with performance I think I can edit the cppcms_tmpl_cc.py code to change behaviour and send patch but want to listen thoughts about it. Thanks. |