profiling of order cache

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1240 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-12-11 15:11:55 +00:00
parent daad8929dc
commit 44a779222d
+5
View File
@@ -18,6 +18,7 @@
#include <util/tagged_string.hpp> // for 0.2.7 fix
#include <util/order_cache.hpp>
#include <script/script_manager.hpp>
#include <script/profiler.hpp>
#include <wx/sstream.h>
DECLARE_TYPEOF_COLLECTION(CardP);
@@ -228,6 +229,10 @@ int Set::positionOfCard(const CardP& card, const ScriptValueP& order_by, const S
keep.push_back((bool)*filter->eval(ctx));
}
}
#if USE_SCRIPT_PROFILING
Timer t;
Profiler prof(t, order_by.get(), _("init order cache"));
#endif
// 3. initialize order cache
order = new_intrusive3<OrderCache<CardP> >(cards, values, filter ? &keep : nullptr);
}