Composer php composer dump autoload-命令

Composer php composer dump autoload-命令,composer-php,Composer Php,我不理解composer dump autoload命令的描述: If you need to update the autoloader because of new classes in a classmap package for example, you can use "dump-autoload" to do that without having to go through an install or update. Additionally, it can dump an opt

我不理解
composer dump autoload
命令的描述:

If you need to update the autoloader because of new classes in a classmap package for example, you can use "dump-autoload" to do that without having to go through an install or update.
Additionally, it can dump an optimized autoloader that converts PSR-0/4 packages into classmap ones for performance reasons. In large applications with many classes, the autoloader can take up a substantial portion of every request's time. Using classmaps for everything is less convenient in development, but using this option you can still use PSR-0/4 for convenience and classmaps for performance. 
为什么它会说
dump。。。出于性能原因
?为什么要卸载优化的装载机? 是“出于性能原因而转储”还是“出于性能原因而转换”

如果它是“性能转储”,那么为什么它会说“性能类映射”

如果是“性能转换”,为什么要卸载自动加载器


我很困惑。

它转储自动加载程序使用的类映射。这样,自动加载程序就不需要搜索文件系统来找到正确的文件,它已经知道该文件了。这将节省时间。

类映射并非在所有情况下都更快。在将其用于生产之前,请小心并衡量您从中获得的好处

有关详细信息,请参见我的回答: