Zend Framework 2: Composer\\Autoload\\includeFile is slow

别来无恙 提交于 2019-12-05 10:18:20

We had the exact same issue while debugging in New Relic. Finally, we traced it to the filesystem, it turned out we weren't using opcode cache, which can be painful under high load.

Check your opcode caching and try to tweak it's memory settings. That's how we managed to solve it.

Sven

Note that "optimizing" the autoloading is not necessarily resulting in the best load times in every case. It's a race between getting faster by eliminating file system access versus getting slower by loading more unused stuff into memory.

Why use a PSR-0 or PSR-4 autoload in composer if classmap is actually faster?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!