summaryrefslogtreecommitdiff
path: root/src/PolySetEvaluator.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2012-01-06 18:10:33 (GMT)
committerMarius Kintel <marius@kintel.net>2012-01-09 23:01:50 (GMT)
commitfe3362faf825016606a8bcd60669c16965b0599c (patch)
tree1cfccc34acf462d9faefdfb8662c48cde878cbf9 /src/PolySetEvaluator.cc
parentc4695872392a6d1415752934be55c81de57de87e (diff)
Started on cache size management: Let cache sizes be read from Preferences, measure cache sizes in bytes
Diffstat (limited to 'src/PolySetEvaluator.cc')
-rw-r--r--src/PolySetEvaluator.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/PolySetEvaluator.cc b/src/PolySetEvaluator.cc
index fc68fb2..e0fcf68 100644
--- a/src/PolySetEvaluator.cc
+++ b/src/PolySetEvaluator.cc
@@ -19,11 +19,13 @@
*/
shared_ptr<PolySet> PolySetEvaluator::getPolySet(const AbstractNode &node, bool cache)
{
- std::string cacheid = this->tree.getIdString(node);
+ const std::string &cacheid = this->tree.getIdString(node);
if (PolySetCache::instance()->contains(cacheid)) {
-// For cache debugging
-// PRINTF("Cache hit: %s", cacheid.substr(0, 40).c_str());
+#ifdef DEBUG
+ // For cache debugging
+ PRINTF("PolySetCache hit: %s", cacheid.substr(0, 40).c_str());
+#endif
return PolySetCache::instance()->get(cacheid);
}
contact: Jan Huwald // Impressum