Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/fsharp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Performance Cakephp组件内部另一个组件的性能_Performance_Cakephp_Cakephp 2.5 - Fatal编程技术网

Performance Cakephp组件内部另一个组件的性能

Performance Cakephp组件内部另一个组件的性能,performance,cakephp,cakephp-2.5,Performance,Cakephp,Cakephp 2.5,关于这一点也有同样的问题 大约3年前发布的,应该是1.3版本 我有一个很大的组件(大约3-4千行),我们称它为BigComponent.php。我在我的userscoontroller.php中使用过几次,在其他几个控制器中也使用过,因此,在每个控制器中,我都通过public$uses将其包括在内。我还在这些控制器中使用另一个组件,所以它也包括在内。现在,考虑我需要在另一个组件中使用BigCube,这是如何处理的,特别是在V中。2.5.3,我的BigComponent是加载一次(通过引用第二次)

关于这一点也有同样的问题 大约3年前发布的,应该是1.3版本

我有一个很大的组件(大约3-4千行),我们称它为BigComponent.php。我在我的userscoontroller.php中使用过几次,在其他几个控制器中也使用过,因此,在每个控制器中,我都通过
public$uses
将其包括在内。我还在这些控制器中使用另一个组件,所以它也包括在内。现在,考虑我需要在另一个组件中使用BigCube,这是如何处理的,特别是在V中。2.5.3,我的BigComponent是加载一次(通过引用第二次)还是两次


谢谢

是的,所有组件只加载一次到另一个名为ComponentCollection的对象中。此集合有助于保持实例的唯一性,无论它们从其他组件引用了多少次