--
--
www.RainTPL.com
group at http://groups.google.com/group/raintpl
unsuscribe at raintpl+u...@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "raintpl" group.
To unsubscribe from this group and stop receiving emails from it, send an email to raintpl+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
Composer and PSR, are new standards that are becoming so popular, that soon they will become the standard de facto, both Twig and Smarty recommend it. You should read http://phptherightway.com and subscribe at http://phpweekly.info and attend at the international conference of PHP (there are a lot in US and Europe).
--
I see your point, perhaps you can download Rain and use its autoloader, but I still recommend to use the Composer autoloader.
Talking about speed, there's always some way to improve the speed, for example using cache or a proxy server
--
So yes, RainTPL must be usable without composer.
But if you want a ligther project, as you seems to, you should not handle dependency in your projects.
Cheers,
How do you think why Rain3 consumes same amount of memory on both stages?Other template engines here tends to load with less footprint if page is already compiled.
--
What stages and which templates?
@thomas, I disagree. You don't have to commit the vendor/ folder, you only have to commit composer.json in your repository. And you definitely start a project faster with Composer than without it. The only reason for not using Composer is when you need to use your custom libraries.
@Etorealno I'm sure Rain is saving the cache somewhere else, because the parsing of the template is slow enough to be visible in your benchmark. Check the filepath.
--
The only reason for not using Composer is when you need to use your custom libraries.
@Etorealno I'm sure Rain is saving the cache somewhere else, because the parsing of the template is slow enough to be visible in your benchmark. Check the filepath.
Tpl::configure(array("tpl_dir" => "templates/", "cache_dir" => "cache/", "debug" => "false"));
Tpl::configure(array("tpl_dir" => "templates/", "cache_dir" => "cache/", "debug" => false));
--
@Etorealno software portability is important, in most hosting you can't run composer install.
Here's the results:w/o cached template: 433.92 KB 0.006 swith cached template: 430.19 KB 0.002 sThe memory doesn't change that much, but speed does.
That's why I ask developers to review current RainTPL3 bundle
and make proper changes to let it work outside /library/ folder
with just right "require_once" path.
Is RainTPL v3 optimized only for speed , not memory consumption?
--
That's why I ask developers to review current RainTPL3 bundle
and make proper changes to let it work outside /library/ folder
with just right "require_once" path.RainTPL 2 works with require_once, RainTPL 3 only with an autoloader.
Is RainTPL v3 optimized only for speed , not memory consumption?No. To make it lighter we'll have to decouple the parser from the loader, by splitting Tpl.php in Tpl.php and ParseTpl.php. You're welcome to do this if you want.
Will you split parser from loader on next release?
--
Will you split parser from loader on next release?
I've separated the Parser from the Tpl class to improve performances, reduce memory and separate responsibilities, can you please review it and test it? https://github.com/rainphp/raintpl3/pull/69
--