summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2009-06-16 13:07:14 +0000
committerAndrey Hristov <andrey@php.net>2009-06-16 13:07:14 +0000
commit10ee06ca48370da3f4858b563d0e0765b4059ee9 (patch)
treeef33b05c58e4d3c7fe211c6d694eb73870228908 /ext/reflection/php_reflection.c
parent34842709d65b35a9c7b9cee9ba68e116917a15b8 (diff)
downloadphp-git-10ee06ca48370da3f4858b563d0e0765b4059ee9.tar.gz
MFH:
Memory usage optimisation. mysqlnd is not libmysql. mysqlnd does use the Zend allocator, which means that is easier to hit memory_limit if you have big stored (buffered) result sets. Before with libmysql you won't hit memory_limit because libmysql uses libc's allocator and nothing is checked. Now, with mysqlnd the situation is stricter and it is easier to hit memory_limit. We try to optimize for big result sets. If a result set is larger than 10 rows we will start freeing some data to keep memory usage after 10 rows constant. This will help in the cases where a buffered result set is scrolled forward only and just only once, or mysqlnd will need to decode data from the network buffers again - yes, it is a trade-off between CPU time and memory size. The best for big result sets is of course using unbuffered queries - for comparison : 3 Million rows with buffered take at least 180MB, with buffered you will stay at 3MB, and unbuffered will be just 7-8% slower.
Diffstat (limited to 'ext/reflection/php_reflection.c')
0 files changed, 0 insertions, 0 deletions