News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Liip Blog:
How to preload ACL in order to get good performances
October 09, 2013 @ 10:40:34

On the Liip blog today Jean-Christophe Zulian shares an idea about gaining performance in your access controlled section of your application. He suggests preloading ACL information in Symfony2-based applications.

Symfony2 comes with an ACL mechanism that can help you whenever you need to add some permissions in your system. [...] Unfortunately we came across a situation where we had to do this kind of permission check on a very long list of items. [...] erformance will go bad (or very bad in our case) and as the system keep storing more and more of the same kind of data it become slower and slower. [...] Luckily for us Sf2 ACL system provides a way out of this. You can in a small amount of query load all the ACLs that are related to some given objects.

He includes a small snippet of code that takes in a set of blog posts (as an example) and calls a "findAcls" method to pre-fetch the information. That information is then available for the rest of the request. The fetch is done by packet instead of via one large query, making it a bit more performant.

0 comments voice your opinion now!
symfony2 preload acl information performance

Link: http://blog.liip.ch/archive/2013/10/09/how-to-preload-acl-in-order-to-get-good-performances.html

blog comments powered by Disqus

Similar Posts

ServerGrove Blog: Spooling emails with Symfony2 on VPS and Shared Hosting

Gonzalo Ayuso's Blog: Performance analysis of Stored Procedures with PDO and PHP

Mastering Zend Framework: Gary Hockinís Maximising Zend Framework 2 Performance Talk (Review)

PHP.net: PHP Manual Updates

Ulf Wendel: The performance penalty of the early MySQL Fabric support for PHP


Community Events





Don't see your event here?
Let us know!


artisanfiles series laravel framework podcast composer opinion conference release security symfony language tool community library introduction interview version list voicesoftheelephpant

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework