mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-12 21:47:00 -04:00
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:
@@ -18,6 +18,7 @@
|
|||||||
#include <util/tagged_string.hpp> // for 0.2.7 fix
|
#include <util/tagged_string.hpp> // for 0.2.7 fix
|
||||||
#include <util/order_cache.hpp>
|
#include <util/order_cache.hpp>
|
||||||
#include <script/script_manager.hpp>
|
#include <script/script_manager.hpp>
|
||||||
|
#include <script/profiler.hpp>
|
||||||
#include <wx/sstream.h>
|
#include <wx/sstream.h>
|
||||||
|
|
||||||
DECLARE_TYPEOF_COLLECTION(CardP);
|
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));
|
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
|
// 3. initialize order cache
|
||||||
order = new_intrusive3<OrderCache<CardP> >(cards, values, filter ? &keep : nullptr);
|
order = new_intrusive3<OrderCache<CardP> >(cards, values, filter ? &keep : nullptr);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user