| Re: XOOPS coding standards the wrong way? OR the benefits of old fashioned coding |
| by frankblack on 2009/12/22 17:11:01 Yes, Protector preload. Including 4 files and making one query. I repacked the firephp-debugger (addons firebug and firephp have to be installed with Firefox) with Smarty debug enabled. I hope I packed it well - get it HERE. For those who want to log variables on its own, just include this in your file: le="color: #000000"><?php require_once XOOPS_ROOT_PATH.'/class/logger/firephp/FirePHPCore/FirePHP.class.php'; $fb = FirePHP::getInstance(true); $fb->registerErrorHandler(false); $fb->log($whatsmyvalue); If you want some deep insight to your XOOPS just copy this to the file where you want to get some information about: le="color: #000000"><?php function getDefinedVars($varList, $excludeList) { $temp1 = array_values(array_diff(array_keys($varList), $excludeList)); $temp2 = array(); while (list($key, $value) = each($temp1)) { global $$value; $temp2[$value] = $$value; } return $temp2; } require_once XOOPS_ROOT_PATH.'/class/logger/firephp/FirePHPCore/FirePHP.class.php'; $fireme = FirePHP::getInstance(true); $excludeList = array('GLOBALS', 'excludeList', 'output', 'xoopsTpl'); $varList = get_defined_vars(); $fireme->log(getDefinedVars($varList, $excludeList)); This should be too much of info!
|
| Re: XOOPS coding standards the wrong way? OR the benefits of old fashioned coding |
| by ghia on 2009/12/22 14:05:54 Quote: Network Performance Tips: This is true for networks, when the database is on another server as the website. But most XOOPS sites have the database host XOOPS_DB_HOST on localhost, so this does not aplply, or have only limited benefits. Quote: Maybe if we look at the files included, there could be optimization? I have to look it up again to say nothing false: there were protector queries and files included although not installed. I'll take a closer look... Protector Preload? |
| Re: XOOPS coding standards the wrong way? OR the benefits of old fashioned coding |
| by frankblack on 2009/12/22 10:15:18 A quote from your quote. ![]() Network Performance Tips: Quote: 1. Minimize traffic by fetching only what you need. Quote: Sounds interesting. Where can I download state-of-the-art module? Well, in fact you gave me the advice to look at these series of modules if I remember correctly. ![]() Quote: And XOOPS Boot is before module loading, how are we getting different values? I would no worry about that. Test scenario is running locally on XAMPP with other programmes open and working. So this might be a reason? Maybe if we look at the files included, there could be optimization? I have to look it up again to say nothing false: there were protector queries and files included although not installed. I'll take a closer look... |
| Re: XOOPS coding standards the wrong way? OR the benefits of old fashioned coding |
| by ghia on 2009/12/22 0:20:10 Quote: Next one is the prevention of SELECT * in queries. Maybe it is just a rumour I heard, that the performance is better with SELECT xy, yz in queries. Where applicable of course Maybe there is some gain, when there are 20+ fields in a table and you need only a few. But most XOOPS tables are rather small, so I don't think there is much benefit Maybe interesting to do once a test and time 1000 requests (or 100 repeated 10 times) eg selecting in the user or a posts table. Most important is the use of a suitable index. The permissions has indeed a scaling problem. If you see queries like this, my stommach turns upside down. Quote: 0.000398 - SELECT * FROM config WHERE (conf_modid = '0' AND conf_catid = '3') ORDER BY conf_order ASC |
| Re: XOOPS coding standards the wrong way? OR the benefits of old fashioned coding |
| by trabis on 2009/12/21 18:42:16 ... And XOOPS Boot is before module loading, how are we getting different values? |