Does Composer provide any performance over Zend Loader in ZF2 -


zf2 using composer package management , distribution. question provide performance boost on zend loader?

firstly, zend\loader namespace , presents multiple classes under hood factories, autoloaders, pluginloaders, moduleloaders etc... so, zend loader !== composer , comparing different concepts wrong.

second thing is, composer not "package manager" , can use zf2 without composer. documentation:

composer not package manager. yes, deals "packages" or libraries, manages them on per-project basis, installing them in directory (e.g. vendor) inside project. default never install globally. thus, dependency manager.

primary concern of composer providing easy dependency management between libraries, standardising autoloading process etc.. not performance. prepares autoload file project of classes in 3rd party libraries installed composer. makes our lives better.

on other hand, zend loader namespace , related classes. short summary official documentation straightforward:

zf2 employs multiple autoloading strategies; example, may have class map used classes, want use psr-0 style autoloader 3rd party libraries.

a short-summary classes under zend loader namespace:

  • classmapautoloader: it's designed performance in mind. avoids unnecessary filesystem operations when autoloading.
  • standardautoloader: it's psr-0-compliant autoloader. assumes 1:1 mapping of namespace + classname filesystem.
  • moduleautolader : special implementation of zend\loader\splautoloader interface, used zend\modulemanager autoload module classes different sources.
  • pluginclassloader : resolves plugin names -> -> class names providing simple mechanism aliasing plugin names classnames later retrieval.

so, if main concern filesystem-level performance, should focus on classmap autoloading , opcode caching. there lot of metrics affects overall application performance , there no silver bullet boost performance.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -