very frequently used function site_url() could be easily optimized - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: very frequently used function site_url() could be easily optimized (/showthread.php?tid=19267) |
very frequently used function site_url() could be easily optimized - El Forum - 06-02-2009 [eluser]sophistry[/eluser] i went looking for site_url() comments in the bug reports forum but found none. here's the bug... site_url() is sloppy and needs to be trim. check this bug report: http://codeigniter.com/bug_tracker/bug/site_url_-_no_real_bug_-_use_trim_instead_of_preg_replace/ then run this code and tell me you aren't convinced that a little change is necessary: Code: function test_trim($str='') |