-
Type: Bug Report
-
Status: Closed
-
Priority: Minor
-
Resolution: no change required
-
Affects Version/s: 5.0.2-B1
-
Fix Version/s: 5.2.0-B1
-
Component/s: Optimization
-
Labels:None
-
External issue URL:
-
Story Points:2
-
External issue ID:475
-
Copy Issue Key:
-
Patch Instructions:
Method kBase::makeClass is calling ref_call_user_func_array no matter if he has only class name or class name + constructor arguments passed. This slows downs the things a little bit. I propose to use code, mentioned above, that was called from kFactory class to optimize things.
if ( func_num_args() == 1 )
{ $class = new $real_class(); }else
{ $func_args = func_get_args(); $pseudo_class = array_shift($func_args); $class =& ref_call_user_func_array( Array ($real_class,'makeClass'), $func_args ); }-------------------------
Also kDBLIst class constructor during filter creation calls makeClass 13 times, but there are only two class types it creates, so we could create two classes and just clone them to create other fiters. Here is problematic code:
$filters = $this->getFilterStructure();
foreach ($filters as $filter_params)
{ $filter =& $this->$filter_params['type']; $filter[ $filter_params['class'] ] =& $this->Application->makeClass('kMultipleFilter', $filter_params['join_using']); }- mentioned in
-
Page Loading...