[Vtigercrm-commits] [Vtiger development] #8169: Clean to_html() function

Vtiger development vtiger-tickets at trac.vtiger.com
Thu Jul 24 10:23:28 GMT 2014


#8169: Clean to_html() function
-------------------------+-------------------------
 Reporter:  sivakumarj   |      Owner:  developer
     Type:  enhancement  |     Status:  new
 Priority:  major        |  Milestone:  6.1.0
Component:  vtigercrm    |    Version:  6.1.0 - wip
 Severity:  High         |   Keywords:
-------------------------+-------------------------
 From Alan's conversation([http://lists.vtigercrm.com/pipermail/vtigercrm-
 developers/2014-July/027633.html]) we got some interesting thing related
 to Vtiger performance.

 to_html() function in include/utils/utils.php get called a lot of times
 for every request.
 This function does a bunch of decisions around what is in $_REQUEST to see
 whether or not it should replace < with < and so on for display. All those
 if statements get evaluated for every call, but as it is always based on
 the same information it always comes to the same result, which is either
 return the unmodified string or return
 htmlentities($string,ENT_QUOTES,$default_charset) or do a preg_replace if
 you are not using utf-8.

 This would be a lot faster if the decisions were done once, in index.php
 or somewhere early in the process, then set a global on whether it should
 or should not convert html so the to_html function itself is much smaller
 and faster.

--
Ticket URL: <http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/8169>
Vtiger development <http://trac.vtiger.com/>
Vtiger CRM


More information about the vtigercrm-commits mailing list