2015-02-06 28 views
1

我不明白composer dump-autoload命令的描述:爲什麼它說dump ... for performance reasons作曲家轉儲自動加載 - 命令

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. 

?爲什麼要傾倒優化的裝載機? 它是'傾銷'還是'轉換爲性能原因'?

如果是「傾銷績效」,爲什麼說classmaps for performance

如果它「轉換爲性能」,那麼爲什麼要傾倒自動裝載機?

我很困惑。

回答

3

它轉儲自動裝載器使用的類映射。這樣,自動加載器不需要搜索文件系統來查找正確的文件,它已經知道文件。這將節省時間。

相關問題