SlideShare a Scribd company logo
1 of 16
Download to read offline
SYMFONY PHP OSLO MEETUP
New in upcoming Symfony 3.1: CACHE COMPONET
“PSR-6 Cache, Symfony Cache component, and beyond”
André Rømcke - VP Engineering @ezsystems
Apr. 20th 2016 - Oslo - Norway Symfony Meetup
www.ez.noez.no
Me
๏André Rømcke @andrerom
๏VP Engineering at eZ Systems AS, eZ is:
Symfony Full stack user & active ecosystem member since 2012
Partner with Sensio Labs (and Blackfire)
Open Source CMS for more then 15 years with deep needs for intelligent caching
๏PHP-FIG voting member
Currently user of Stash Cache, project that originally initiated PSR-6
Been at times participating in discussions around PSR-6 and Symfony Cache
www.ez.noez.no
PSR-6?
๏First proposed in Dec 14, 2011, final version approved Dec 8, 2015
๏Been true several iterations, polls among PHP users/library-providers, ..
๏Will be expanded in the future with additional features as implementations evolves
๏Some known implementations:
๏Stash
๏PHP-Cache
๏Symfony
๏..and many others
๏http://www.php-fig.org/psr/psr-6/
www.ez.noez.no
PSR-6: Example
namespace PsrCacheCacheItemPoolInterface;


function getWidgetList(CacheItemPoolInterface $pool)

{

$item = $pool->getItem('widget_list');// or getItems($array) to load several cache items
if (!$item->isHit()) {
$item->set($this->computeExpensiveWidgetList());
$pool->save($item);// or saveDeferred() if it can be saved in batch by end of request
}
return $item->get();

}
No need to type hint
against Symfony with this
www.ez.noez.no
Symfony Cache?
www.ez.noez.no
Symfony Cache Component
๏PSR-6 Compliant cache component
๏Aims to be fast, made by Blackfire CTO: Nicolas Grekas
๏Provides several built in cache adapters by default
๏Is progressively being used in several places in Symfony Framework, right now:
๏PropertyInfo
๏Serializer
๏Validator
As per April 2016
See bonus slides at
the end
www.ez.noez.no
Symfony Cache Adapters
๏APCu (per proces cache)
๏Array (in memory per request, mainly for testing)
๏Chain (chain several adapters after each-other)
๏Doctrine
๏FileSystem
๏Proxy (To reuse other PSR-6 implementations)
๏Redis
๏and more being added as we speak..
As per April 2016
See next slide
www.ez.noez.no
Doctrine Cache Providers
๏APC & APCu (per proces cache)
๏Array (in memory per request, mainly for testing)
๏Chain (chain several providers after each-other)
๏Couchbase
๏File & FileSystem & PhpFile
๏Memcache & Memcached
๏MongoDB
๏Redis & Predis
๏Riak
๏SQLite3
๏WinCache
๏Cache
๏ZendCache
As per April 2016
www.ez.noez.no
Cache Libs Comparisons: Features
Stash Doctrine Symfony**
Multi GET X* V V
Hierarchical V X X
Versioning X V X
Namespacing V V V
Tagging X X X
PSR-6 V X V
* Not implemented, interface has existed for long time. ** As of Symfony 3.1
www.ez.noez.no
Cache Libs Comparisons: Backend lookups
Stash* Doctrine** Symfony***
article-42 2 2 1
content/item-42 3 2 1
content/item-42 &
content/item-33 5 2 1
*** W/ native adapters, not Doctrine.* memcached/redis, to compute keys for hierarchical cache. ** With versioning.
Round trips done to backend cache system for a given cache item(s) lookup, esp. important if high latency.
www.ez.noez.no
Next steps for eZ perspective
๏Currently rely on Hierarchical caching to handle cache clearing on related items
๏Lets us clear cache content/55/*, and it will clear all objects we have there
๏However limited when we need to clear cache on tree/batch operations in the CMS
๏eg deleting News/ will in some cases cause all content/* cache being cleared

๏Aiming to use Cache Tagging for this instead in data cache (and HTTPCache*)
๏Example: content-55-version-44 cache item would have tags like:
• content-55
• location-33
• content-type-1 aka Folder
• [ location-path-2, location-path-13, location-path-33 ]
• Will allow us to clear relevant cache much more precisely without cache dog piling
* We already support single tag across Varnish and Symfony Proxy, aim is to support multi tag for all.
www.ez.noez.no
Practical Info
๏Symfony 3.1 is coming end of May 2016

๏eZ working with others to add Tagging support
๏Either in Symfony or in Symfony Community
๏We aim to move to Symfony 3.x for our 2017

releases (earliest December)
๏Interested in talking or

sponsoring Symfony

meetups? 

=> Contact organizers on the

Symfony meetup.com page!
www.ez.noez.no
Bonus #1: Incoming Symfony Cache Adapter
๏OpCache (ongoing PR right now building on work done in Composer v1.1/v2)
www.ez.noez.no
Bonus #2: Autoload performance in Composer.next
ez.no
Bonus #3: Plain Array?
NORMAL DYNAMIC ARRAY
$array = [

$vendorDir.’/symfony/symfony',

$vendorDir.’/ezsystems/ezpublish-kernel'

];
ARRAY USING CONSTANT EXPRESSION
const ARR = [

__DIR__.’/symfony/symfony',

__DIR__.’/ezsystems/ezpublish-kernel'

];
DIFFERENCE?
As of PHP 5.6 with Constant Expressions, opcache I can avoid having to load the array and execute it on each
request by using a constant, as it can be reuse directly from SHM (Shared Memory Cache). On large (Symfony)
installs when using composer “dump-autoload” this class map can be several megabytes which is why this can
have a big impact.



Further reading: http://blog.blackfire.io/speeding-up-autoloading-on-php-5-6-7-0-for-everyone.html
Fin
ez.no

More Related Content

More from André Rømcke

SymfonyCon 2019: Head first into Symfony Cache, Redis & Redis Cluster
SymfonyCon 2019:   Head first into Symfony Cache, Redis & Redis ClusterSymfonyCon 2019:   Head first into Symfony Cache, Redis & Redis Cluster
SymfonyCon 2019: Head first into Symfony Cache, Redis & Redis ClusterAndré Rømcke
 
SfDay 2019: Head first into Symfony Cache, Redis & Redis Cluster
SfDay 2019: Head first into Symfony Cache, Redis & Redis ClusterSfDay 2019: Head first into Symfony Cache, Redis & Redis Cluster
SfDay 2019: Head first into Symfony Cache, Redis & Redis ClusterAndré Rømcke
 
Symfony live London 2018 - Take your http caching to the next level with xke...
Symfony live London 2018 -  Take your http caching to the next level with xke...Symfony live London 2018 -  Take your http caching to the next level with xke...
Symfony live London 2018 - Take your http caching to the next level with xke...André Rømcke
 
Look Towards 2.0 and Beyond - eZ Conference 2016
Look Towards 2.0 and Beyond -   eZ Conference 2016Look Towards 2.0 and Beyond -   eZ Conference 2016
Look Towards 2.0 and Beyond - eZ Conference 2016André Rømcke
 
Dockerize your Symfony application - Symfony Live NYC 2014
Dockerize your Symfony application - Symfony Live NYC 2014Dockerize your Symfony application - Symfony Live NYC 2014
Dockerize your Symfony application - Symfony Live NYC 2014André Rømcke
 
PhpTour Lyon 2014 - Transparent caching & context aware http cache
PhpTour Lyon 2014 - Transparent caching & context aware http cachePhpTour Lyon 2014 - Transparent caching & context aware http cache
PhpTour Lyon 2014 - Transparent caching & context aware http cacheAndré Rømcke
 
eZ publish 5[-alpha1] Introduction & Architecture
eZ publish 5[-alpha1] Introduction & ArchitectureeZ publish 5[-alpha1] Introduction & Architecture
eZ publish 5[-alpha1] Introduction & ArchitectureAndré Rømcke
 
eZ Publish 5, Re architecture, pitfalls and opportunities
eZ Publish 5, Re architecture, pitfalls and opportunitieseZ Publish 5, Re architecture, pitfalls and opportunities
eZ Publish 5, Re architecture, pitfalls and opportunitiesAndré Rømcke
 

More from André Rømcke (8)

SymfonyCon 2019: Head first into Symfony Cache, Redis & Redis Cluster
SymfonyCon 2019:   Head first into Symfony Cache, Redis & Redis ClusterSymfonyCon 2019:   Head first into Symfony Cache, Redis & Redis Cluster
SymfonyCon 2019: Head first into Symfony Cache, Redis & Redis Cluster
 
SfDay 2019: Head first into Symfony Cache, Redis & Redis Cluster
SfDay 2019: Head first into Symfony Cache, Redis & Redis ClusterSfDay 2019: Head first into Symfony Cache, Redis & Redis Cluster
SfDay 2019: Head first into Symfony Cache, Redis & Redis Cluster
 
Symfony live London 2018 - Take your http caching to the next level with xke...
Symfony live London 2018 -  Take your http caching to the next level with xke...Symfony live London 2018 -  Take your http caching to the next level with xke...
Symfony live London 2018 - Take your http caching to the next level with xke...
 
Look Towards 2.0 and Beyond - eZ Conference 2016
Look Towards 2.0 and Beyond -   eZ Conference 2016Look Towards 2.0 and Beyond -   eZ Conference 2016
Look Towards 2.0 and Beyond - eZ Conference 2016
 
Dockerize your Symfony application - Symfony Live NYC 2014
Dockerize your Symfony application - Symfony Live NYC 2014Dockerize your Symfony application - Symfony Live NYC 2014
Dockerize your Symfony application - Symfony Live NYC 2014
 
PhpTour Lyon 2014 - Transparent caching & context aware http cache
PhpTour Lyon 2014 - Transparent caching & context aware http cachePhpTour Lyon 2014 - Transparent caching & context aware http cache
PhpTour Lyon 2014 - Transparent caching & context aware http cache
 
eZ publish 5[-alpha1] Introduction & Architecture
eZ publish 5[-alpha1] Introduction & ArchitectureeZ publish 5[-alpha1] Introduction & Architecture
eZ publish 5[-alpha1] Introduction & Architecture
 
eZ Publish 5, Re architecture, pitfalls and opportunities
eZ Publish 5, Re architecture, pitfalls and opportunitieseZ Publish 5, Re architecture, pitfalls and opportunities
eZ Publish 5, Re architecture, pitfalls and opportunities
 

Recently uploaded

What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 

Recently uploaded (20)

What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 

Symfony meetup: PSR-6 & Symfony 3.1 Cache Component

  • 1. SYMFONY PHP OSLO MEETUP New in upcoming Symfony 3.1: CACHE COMPONET “PSR-6 Cache, Symfony Cache component, and beyond” André Rømcke - VP Engineering @ezsystems Apr. 20th 2016 - Oslo - Norway Symfony Meetup
  • 2. www.ez.noez.no Me ๏André Rømcke @andrerom ๏VP Engineering at eZ Systems AS, eZ is: Symfony Full stack user & active ecosystem member since 2012 Partner with Sensio Labs (and Blackfire) Open Source CMS for more then 15 years with deep needs for intelligent caching ๏PHP-FIG voting member Currently user of Stash Cache, project that originally initiated PSR-6 Been at times participating in discussions around PSR-6 and Symfony Cache
  • 3. www.ez.noez.no PSR-6? ๏First proposed in Dec 14, 2011, final version approved Dec 8, 2015 ๏Been true several iterations, polls among PHP users/library-providers, .. ๏Will be expanded in the future with additional features as implementations evolves ๏Some known implementations: ๏Stash ๏PHP-Cache ๏Symfony ๏..and many others ๏http://www.php-fig.org/psr/psr-6/
  • 4. www.ez.noez.no PSR-6: Example namespace PsrCacheCacheItemPoolInterface; 
 function getWidgetList(CacheItemPoolInterface $pool)
 {
 $item = $pool->getItem('widget_list');// or getItems($array) to load several cache items if (!$item->isHit()) { $item->set($this->computeExpensiveWidgetList()); $pool->save($item);// or saveDeferred() if it can be saved in batch by end of request } return $item->get();
 } No need to type hint against Symfony with this
  • 6. www.ez.noez.no Symfony Cache Component ๏PSR-6 Compliant cache component ๏Aims to be fast, made by Blackfire CTO: Nicolas Grekas ๏Provides several built in cache adapters by default ๏Is progressively being used in several places in Symfony Framework, right now: ๏PropertyInfo ๏Serializer ๏Validator As per April 2016 See bonus slides at the end
  • 7. www.ez.noez.no Symfony Cache Adapters ๏APCu (per proces cache) ๏Array (in memory per request, mainly for testing) ๏Chain (chain several adapters after each-other) ๏Doctrine ๏FileSystem ๏Proxy (To reuse other PSR-6 implementations) ๏Redis ๏and more being added as we speak.. As per April 2016 See next slide
  • 8. www.ez.noez.no Doctrine Cache Providers ๏APC & APCu (per proces cache) ๏Array (in memory per request, mainly for testing) ๏Chain (chain several providers after each-other) ๏Couchbase ๏File & FileSystem & PhpFile ๏Memcache & Memcached ๏MongoDB ๏Redis & Predis ๏Riak ๏SQLite3 ๏WinCache ๏Cache ๏ZendCache As per April 2016
  • 9. www.ez.noez.no Cache Libs Comparisons: Features Stash Doctrine Symfony** Multi GET X* V V Hierarchical V X X Versioning X V X Namespacing V V V Tagging X X X PSR-6 V X V * Not implemented, interface has existed for long time. ** As of Symfony 3.1
  • 10. www.ez.noez.no Cache Libs Comparisons: Backend lookups Stash* Doctrine** Symfony*** article-42 2 2 1 content/item-42 3 2 1 content/item-42 & content/item-33 5 2 1 *** W/ native adapters, not Doctrine.* memcached/redis, to compute keys for hierarchical cache. ** With versioning. Round trips done to backend cache system for a given cache item(s) lookup, esp. important if high latency.
  • 11. www.ez.noez.no Next steps for eZ perspective ๏Currently rely on Hierarchical caching to handle cache clearing on related items ๏Lets us clear cache content/55/*, and it will clear all objects we have there ๏However limited when we need to clear cache on tree/batch operations in the CMS ๏eg deleting News/ will in some cases cause all content/* cache being cleared
 ๏Aiming to use Cache Tagging for this instead in data cache (and HTTPCache*) ๏Example: content-55-version-44 cache item would have tags like: • content-55 • location-33 • content-type-1 aka Folder • [ location-path-2, location-path-13, location-path-33 ] • Will allow us to clear relevant cache much more precisely without cache dog piling * We already support single tag across Varnish and Symfony Proxy, aim is to support multi tag for all.
  • 12. www.ez.noez.no Practical Info ๏Symfony 3.1 is coming end of May 2016
 ๏eZ working with others to add Tagging support ๏Either in Symfony or in Symfony Community ๏We aim to move to Symfony 3.x for our 2017
 releases (earliest December) ๏Interested in talking or
 sponsoring Symfony
 meetups? 
 => Contact organizers on the
 Symfony meetup.com page!
  • 13. www.ez.noez.no Bonus #1: Incoming Symfony Cache Adapter ๏OpCache (ongoing PR right now building on work done in Composer v1.1/v2)
  • 14. www.ez.noez.no Bonus #2: Autoload performance in Composer.next
  • 15. ez.no Bonus #3: Plain Array? NORMAL DYNAMIC ARRAY $array = [
 $vendorDir.’/symfony/symfony',
 $vendorDir.’/ezsystems/ezpublish-kernel'
 ]; ARRAY USING CONSTANT EXPRESSION const ARR = [
 __DIR__.’/symfony/symfony',
 __DIR__.’/ezsystems/ezpublish-kernel'
 ]; DIFFERENCE? As of PHP 5.6 with Constant Expressions, opcache I can avoid having to load the array and execute it on each request by using a constant, as it can be reuse directly from SHM (Shared Memory Cache). On large (Symfony) installs when using composer “dump-autoload” this class map can be several megabytes which is why this can have a big impact.
 
 Further reading: http://blog.blackfire.io/speeding-up-autoloading-on-php-5-6-7-0-for-everyone.html