Commit ca51b56d authored by Prasad's avatar Prasad
Browse files

Merge branch 'performance_improvements' into 'master'

store a cache of converted html so that we don't convert the same thing multiple times ref #7

See merge request !37
parents cae7d933 4c3b9520
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -345,9 +345,14 @@ $toHtml = array(
       */
function to_html($string, $encode=true)
{
        $startstring=$string;
	$cachedresult=Vtiger_Cache::get('to_html',$startstring);
	if($cachedresult){
		return $cachedresult;
	}

	global $log,$default_charset;
	//$log->debug("Entering to_html(".$string.",".$encode.") method ...");
	global $toHtml;
	$action = $_REQUEST['action'];
	$search = $_REQUEST['search'];

@@ -385,6 +390,7 @@ function to_html($string, $encode=true)
	}

	//$log->debug("Exiting to_html method ...");
	Vtiger_Cache::set('to_html', $startstring, $string);
	return $string;
}