Anonymous | Login | Signup for a new account | 2024-05-07 21:42 CDT |
Main | My View | View Issues | Change Log | Roadmap | Docs | Wiki | Repositories |
Dependency Graph | [ View Issue ] [ Relation Graph ] [ Horizontal ] | |||
|
||||
|
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 |
Main | My View | View Issues | Change Log | Roadmap | Docs | Wiki | Repositories |
Web Development by Intechnic In-Portal Open Source CMS |