326
I Use This!
Activity Not Available

News

Analyzed about 1 year ago. based on code collected about 3 years ago.
Posted over 12 years ago by miller
This post is a few notes to follow up on some of the responses to my previous post on reusing inner Twig templates for full page responses and ajax responses. One clarification to make, as I had not made it clear, is that is only relevant to the case where you are sending back HTML […]
Posted over 12 years ago by [email protected] (Symfony CMF)
The last few months have seen a huge increase of activity on the CMF (we seem to not have written many news, but those following the github projects will have seen it). Both Jackalope and PHPCR-ODM and the CMF bundles got new features and tons of ... [More] issues fixed. And the documentation is starting to take shape, but can still use a lot of improvement. With all this activity, it will be hard to draw the line for a 1.0 release, but nonetheless we need to do it. We built a release plan that wants to stabilize from the bottom up. We start with PHPCR and phpcr-utils, then go to Jackalope and its transports, then the Doctrine PHPCR-ODM and finally the Symfony2 CMF bundles. We created milestones in the PHPCR / Jackalope / PHPCR-ODM space for now. We hope to get through them until beginning of April, and should probably start version 1.0 milestones for the Symfony2 bundles mid of March and focus on the needed pieces in April. The scope of features we get will depend on the contributions by everybody. But on the other hand, there is no problem adding new features soon afterwards and frequently tagging new versions - as long as we do not need to break backwards compatibility. One important focus is thus to tackle those problems that could require BC breaks so we can get them over before going to a stable release. [Less]
Posted over 12 years ago by Tomasz Ducin
Posted over 12 years ago by
Posted over 12 years ago by nick4fake
Posted over 12 years ago by Tobias Sjösten
Posted over 12 years ago by Fabien Potencier
Posted over 12 years ago by COil
Hi Symfonians, Long time since my last post�! But it's mainly because I actually have a lot of work with Symfony2 projects. One of my current task is to optimize the performances of a Symfony2.0.x project. I was curious to test the Twig C extension ... [More] to check if there was a real improvement before using it in our production environment. Here we go: I will not describe the installation as it is very easy, just follow the official documentation. When the extension is correctly installed you have a new Twig entry in your phpinfo(): The benchmark To test the extension, I choose the most complex page of the site (complex at the Twig level): Renders a tree of about 500 checkboxes Recursive include calls are made inside the templates Widget rendering does not use the Symfony2 form helpers The main template: (Called 6 times with different data) The recursive Twig template _group_tree.html.twig: PS: Note here that we didn't used here a native Symfony2 form, because the rendering (bind + renderering) was taking about 5 seconds... Test conditions: Symfony 2.0.22, of course the production environment is used for the test. PHP 5.3.2-1ubuntu4.18 with Suhosin-Patch (cli) (built: Sep 12 2012 19:12:47) php app/check.php, no warning or error, APC is enabled with an APC autoloader. Results without the extension: 1000 iterations Apache was restarted and Symfony2 cache was cleared between each test The following results are the second run because the 1st run has to rebuild the Symfony cache. [10:39:54] coil@ubuntu:~/Webdev$ ab -n 1000 http://dev.project.com/search This is ApacheBench, Version 2.3 Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking dev.project.com (be patient) Completed 100 requests Completed 200 requests Completed 300 requests Completed 400 requests Completed 500 requests Completed 600 requests Completed 700 requests Completed 800 requests Completed 900 requests Completed 1000 requests Finished 1000 requests Server Software: Apache/2.2.14 Server Hostname: dev.project.com Server Port: 80 Document Path: /search Document Length: 197192 bytes Concurrency Level: 1 Time taken for tests: 99.232 seconds Complete requests: 1000 Failed requests: 0 Write errors: 0 Total transferred: 197742000 bytes HTML transferred: 197192000 bytes Requests per second: 10.08 [#/sec] (mean) Time per request: 99.232 [ms] (mean) Time per request: 99.232 [ms] (mean, across all concurrent requests) Transfer rate: 1946.03 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.0 0 0 Processing: 95 99 4.4 98 190 Waiting: 92 96 4.2 95 187 Total: 95 99 4.4 98 190 Percentage of the requests served within a certain time (ms) 50% 98 66% 101 75% 102 80% 102 90% 103 95% 104 98% 108 99% 110 100% 190 (longest request) Results with the extension enabled: [10:36:34] coil@ubuntu:~/Webdev$ ab -n 1000 http://dev.project.com/search This is ApacheBench, Version 2.3 Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking dev.project.com (be patient) Completed 100 requests Completed 200 requests Completed 300 requests Completed 400 requests Completed 500 requests Completed 600 requests Completed 700 requests Completed 800 requests Completed 900 requests Completed 1000 requests Finished 1000 requests Server Software: Apache/2.2.14 Server Hostname: dev.project.com Server Port: 80 Document Path: /search Document Length: 197192 bytes Concurrency Level: 1 Time taken for tests: 84.887 seconds Complete requests: 1000 Failed requests: 0 Write errors: 0 Total transferred: 197742000 bytes HTML transferred: 197192000 bytes Requests per second: 11.78 [#/sec] (mean) Time per request: 84.887 [ms] (mean) Time per request: 84.887 [ms] (mean, across all concurrent requests) Transfer rate: 2274.87 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.0 0 0 Processing: 81 85 2.9 84 127 Waiting: 78 82 2.7 81 124 Total: 81 85 2.9 84 127 Percentage of the requests served within a certain time (ms) 50% 84 66% 86 75% 87 80% 87 90% 88 95% 89 98% 91 99% 94 100% 127 (longest request) (I have run the tests several times to check that the results are reliable) Conclusion As you can see, it is quiet interesting as the global gain is about 14,5%. I have tested on several smaller templates but the gain was insignificant and less than 1%. (which seems logical) So the extension can really be helpful on complex templates with a lot of parameters, the more complex the Twig templates are the more gain you will have. (up to 15%) See you. COil About the extension: http://derickrethans.nl/twig-extension.html http://twig.sensiolabs.org/doc/intro.html#installing-the-c-extension For other Symfony2 performance tricks check out the following resources: http://slides.seld.be/?file=2011-10-20+High+Performance+Websites+with+Symfony2.html [Less]
Posted over 12 years ago by
Posted over 12 years ago by Christian