I've been trying to track down some performance issues with an ExpressionEngine site, specifically around pages using CartThrob. I've been using XDebug and Webgrind, and noticed that CI_Encrypt->encode was causing the bulk of my performance issues.
Much of the problem was resolved by enabling the PHP mcrypt module, although CI_Encrypt still seems to be the major bottleneck in my application.
Now, the problem seems to be with CI_Encrypt->_add_cypher_noise, which is taking almost 1.5 seconds to run just 40 times, accounting for over half of my page load time.
Is there any way to improve the performance of this function?