Symfony2: the world slowest framework
-
Upload
filippo-de-santis -
Category
Documents
-
view
1.734 -
download
3
description
Transcript of Symfony2: the world slowest framework
Symfony2The world slowest framework
venerdì 18 ottobre 13
What’s a framework?
[...] a software framework is an abstraction in which software providing generic functionality can be
selectively changed by additional user-written code, thus providing application-specific software.
http://en.wikipedia.org/wiki/Software_framework
venerdì 18 ottobre 13
FrameworkVS
Library
Inversion of Control
venerdì 18 ottobre 13
Framework
ValueAND
Technical debt
venerdì 18 ottobre 13
Speed
venerdì 18 ottobre 13
Procedural VS OO Code
venerdì 18 ottobre 13
Procedural VS OO Code
venerdì 18 ottobre 13
Optimization
venerdì 18 ottobre 13
Server VS Dev Costs
venerdì 18 ottobre 13
Freedom to change
venerdì 18 ottobre 13
What do you need?
venerdì 18 ottobre 13
What do you like?
venerdì 18 ottobre 13
Knowledge
venerdì 18 ottobre 13
Community
venerdì 18 ottobre 13
Steep learning curve
Symfony: beware of
venerdì 18 ottobre 13
Symfony: beware of
from great powercomes great responsability
venerdì 18 ottobre 13
Community
Why I choose Symfony
venerdì 18 ottobre 13
Why I choose Symfony
Adhere to standards
venerdì 18 ottobre 13
Frameworks are developers tools
Why I choose Symfony
venerdì 18 ottobre 13
No need for the full package
[thanks composer!]
Why I choose Symfony
venerdì 18 ottobre 13
Based on HTTP
[request/response, caching, reverse proxy, esi]
Why I choose Symfony
venerdì 18 ottobre 13
To Production
php app/check.php
venerdì 18 ottobre 13
AppCache.php is your friend
To Production
venerdì 18 ottobre 13
Doctrine
query_cache_drivermetadata_cache_driver
result_cache_driver
APC - Memcache - XCache - Redis
To Production
venerdì 18 ottobre 13
Profiler
No, thanks.
Always add ‘--env=prod’ to command
To Production
venerdì 18 ottobre 13
Logging
Only errors, thanks.
To Production
Monolog ‘buer_size’ parameter
venerdì 18 ottobre 13
Apache routes
php app/console router:dump-apache -e=prod --no-debug
To Production
venerdì 18 ottobre 13
Assetic
php app/console assetic:dump --env=prod --no-debug
To Production
venerdì 18 ottobre 13
Composer
php composer.phar install --optimize-autoloader
To Production
venerdì 18 ottobre 13
PHP < 5.5 => APC
PHP >= 5.5 => OPCache
To Production
venerdì 18 ottobre 13
3. Premature optimization is the route of all evil
My Conclusion
2. Readability matters
1. Choose on your needs
venerdì 18 ottobre 13
Thanks
Filippo De Santis
@filippodesantis
venerdì 18 ottobre 13
http://slides.seld.be/?file=2011-10-20+High+Performance+Websites+with+Symfony2.html#1
http://www.gregfreeman.org/2013/your-php-framework-choice-doesnt-matter/
https://igor.io/2013/09/02/how-heavy-is-silex.html
http://stackoverflow.com/questions/16696763/why-is-symfony2-performing-so-bad-in-benchmarks-and-does-it-matter
http://symfony2-checklist.com/
http://slides.liip.ch/static/2012-05-18_symfony-speed.html#1
http://www.slideshare.net/liuggio/rationally-boost-your-symfony2-application-with-caching-tips-and-monitoring
http://www.nigeldunn.com/2011/11/24/my-last-thoughts-on-symfony2/
http://docs.doctrine-project.org/en/latest/reference/caching.html
http://symfony.com/doc/current/index.html
http://www.emanueleminotto.it/im-afraid-symfony-2-performances
http://www.slideshare.net/liuggio/rationally-boost-your-symfony2-application-with-caching-tips-and-monitoring
Refs
venerdì 18 ottobre 13
http://www.flickr.com/photos/stankuns/8738770989
http://www.davehakkens.nl/
http://www.flickr.com/photos/takahiro/359406450
http://www.flickr.com/photos/mayhem/2939259129
http://www.flickr.com/photos/pfv/2739621207/
http://www.flickr.com/photos/kitty-kat/6049220331
http://www.flickr.com/photos/mtwashington/5062599268
http://www.flickr.com/photos/harlequeen/6371193319
http://www.flickr.com/photos/28990363@N05/6414310131
PICS
venerdì 18 ottobre 13