|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-05-19 09:40 UTC] arnaud@php.net
[2003-05-19 09:59 UTC] lsmith@php.net
[2003-05-19 10:52 UTC] dholmes at jccc dot net
[2003-05-19 15:46 UTC] ssb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 23 20:00:01 2025 UTC |
I recently discovered apd and I ran it up against our site's framework. Imagine my surprise when I saw that I was hitting strlen 27917 times! It turns out that I heavily use PEAR DB's prepare() functionality. In the current CVS, the prepare function is: function prepare($query) { $tokens = split("[\&\?\!]", $query); $token = 0; $types = array(); for ($i = 0; $i < strlen($query); $i++) { But if I change it to: $length = strlen($query); for ($i = 0; $i < $length; $i++) { I was able to shave almost 2 seconds off of my uncached render times. Don't think for a minute that I don't love PEAR::DB. I appreciate all your hard work and recommend it constantly. Thanks! - Dan