From: bert hubert Date: Tue, 18 Mar 2014 20:06:30 +0000 (+0100) Subject: remove packet cache scanning functions from rec_control get-all - too much overhead! X-Git-Tag: rec-3.6.0-rc1~123 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8e42d27d936acd9fdd37327e96fda0b2ae916a42;p=thirdparty%2Fpdns.git remove packet cache scanning functions from rec_control get-all - too much overhead! --- diff --git a/pdns/rec_channel_rec.cc b/pdns/rec_channel_rec.cc index d31bde3cb2..e4bc361cca 100644 --- a/pdns/rec_channel_rec.cc +++ b/pdns/rec_channel_rec.cc @@ -69,7 +69,9 @@ map getAllStatsMap() BOOST_FOREACH(the64bits, d_get64bitpointers) { ret.insert(make_pair(the64bits.first, lexical_cast(*the64bits.second))); } - BOOST_FOREACH(the32bitmembers, d_get32bitmembers) { + BOOST_FOREACH(the32bitmembers, d_get32bitmembers) { + if(the32bitmembers.first == "cache-bytes" || the32bitmembers.first=="packetcache-bytes") + continue; // too slow for 'get-all' ret.insert(make_pair(the32bitmembers.first, lexical_cast(the32bitmembers.second()))); } return ret; diff --git a/pdns/recursor_cache.cc b/pdns/recursor_cache.cc index 5844df6a12..53030baa79 100644 --- a/pdns/recursor_cache.cc +++ b/pdns/recursor_cache.cc @@ -91,6 +91,7 @@ unsigned int MemRecursorCache::size() return (unsigned int)d_cache.size(); } +// this function is too slow to poll! unsigned int MemRecursorCache::bytes() { unsigned int ret=0;