Hello all,
I've got serious performance problems on my i5. The server response time indicated on each page is always between 5 and 30 seconds.
Even the login page needs at least 7 sec to finish. According to the ZendProfiler the longest running function is get_themes() in utils.php, with about 1.5 seconds own time. So I tried to reproduce this in a standalone file, but this script need only 0.2 seconds to finish.
So I assume there's no problem with SugarCRM but with my server configuration. What am I doing wrong?
PHP Code:<html>
<head>
<title>.: get_themes() - Performance Test :.</title>
</head>
<body>
<h1>get_themes() - Performance Test</h1>
<p>
<?php
define('sugarEntry', true);
chdir("sugarcrm");
$filelist = get_themes();
var_export($filelist);
/**
* Return an array of directory names.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
*/
function get_themes() {
if ($dir = opendir("./themes")) {
while (($file = readdir($dir)) !== false) {
if ($file != ".." && $file != "." && $file != "CVS" && $file != "Attic") {
if(is_dir("./themes/".$file)) {
if(!($file[0] == '.')) {
// set the initial theme name to the filename
$name = $file;
// if there is a configuration class, load that.
if(is_file("./themes/$file/config.php"))
{
unset($theme_name);
unset($version_compatibility);
require("./themes/$file/config.php");
$name = $theme_name;
if(is_file("./themes/$file/header.php") && $version_compatibility >= 2.0)
{
$filelist[$file] = $name;
}
}
}
}
}
}
closedir($dir);
}
ksort($filelist);
return $filelist;
}
?>
</p>
</body>
</html>


LinkBack URL
About LinkBacks




Reply With Quote
Bookmarks