VSE+ wrote:Any 3rd party template system will add more MB overhead to an already memory-hungry phpBB, and phpBB3.1 is already a RAM hog from what I have tested:
phpBB 3.0.11 index page uses 4.97 MB
phpBB 3.1 index page uses 8.87 MB
The oppisite.
Using twig is faster. Igorw did a POC which proved that if I recall correctly.
DavidIQ wrote:+1 for phpBB 4. This is too big of a change to throw it at the community for the 3.x line.
Its long been decided that we should just make larger changes in 3.x rather than rewrite for 4.0. Rewriting phpBB will simply never happen? Anyway, the 1st option wouldn't be much of a change at all. The 2nd change isn't much of a difference. Its just changing the template syntax which isn't a very large change if I'm honest, it would just have a large diff.
From {VAR} to {{ VAR }} and <!-- IF blah eq 'no' --> to {% if blah == 'no' %} (Which is basically php's syntax and is less chars). The only difference would be blocks. But we don't
have to use them as it still supports including files. However its just better to have a layered architecture with blocks.
Also, didn't the template system in phpBB just get a complete overhaul for 3.1? Seems like a lot of wasted work to propose moving to another now. Also, after years of working with it, I think phpBB's current system is very familiar to developers, and it's gonna be a steep enough of a learning curve for any developers to learn phpBB 3.1. Just doesn't seem like a good idea now to throw in a new templating system to me. Perhaps maybe for phpBB 4.
That shouldn't be a reason to implement or not implement something. Work has and always will not get used. Its how development works. Because work has been done on something doesn't mean we shouldn't use a better solution.
As for learning curve, if you know PHP it will take you 5 minutes. If you knew phpbb's old template syntax but not PHP it will take you 15 minutes.
Senky wrote:Even though I havent tried Twig on any live project yet, I think it has quite complicated syntax without any reason. Especially, I do not like that percentage signs, they are quite annoying, on the other hand, phpBB's current syntax is not much simpler.
I like Twig is extensible and can be rewritten to use our syntax, however, what about considering
Smarty? I do not know full features of Twig, so if someone knows both Twig and Smarty, he could express if we can gain more advantages on Twig or Smarty. I propose this just to consider another really nice and simple template system...
Smarty is neither as widely used, is slower and not as powerful (off the top of my head).