profile the loading of package images

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1554 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2010-12-07 21:23:10 +00:00
parent 24c95b0f33
commit 525af32c85
+6 -1
View File
@@ -10,6 +10,7 @@
#include <gui/control/package_list.hpp>
#include <util/io/package_manager.hpp>
#include <util/alignment.hpp>
#include <script/profiler.hpp>
DECLARE_TYPEOF_COLLECTION(PackagedP);
@@ -64,9 +65,13 @@ void PackageList::showData(const String& pattern) {
packages.clear();
// find matching packages
vector<PackagedP> matching;
package_manager.findMatching(pattern, matching);
{
PROFILER(_("find matching packages"));
package_manager.findMatching(pattern, matching);
}
FOR_EACH(p, matching) {
// open image
PROFILER(_("load package image"));
InputStreamP stream = p->openIconFile();
Image img;
Bitmap bmp;