In-Portal Issue Tracker

Welcome to the In-Portal Open Source CMS Issue Tracker! This is a central management / tracking tool for all types of tasks / issues / bugs for the In-Portal Project. Before reporting any issues, please make sure to read the Guide into Issue Tracker and How to Properly Test and Report Bugs!

Relationship Graph View Issue ] Dependency Graph ]
related to child of duplicate of

Viewing Issue Simple Details
ID Category Type Reproducibility Date Submitted Last Update
0000475 [In-Portal CMS] Optimization task always 2009-12-23 02:24 2012-07-25 05:33
Reporter alex View Status public  
Assigned To !COMMUNITY
Priority normal Resolution fixed  
Status closed      
Summary 0000475: Inappropriate "eval" usage in kBase::makeClass method
Description 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']);
}
Additional Information



Web Development by Intechnic
In-Portal Open Source CMS
In-Portal Open Source CMS
Copyright © 2000 - 2009 MantisBT Group

Powered by Mantis Bugtracker