mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-13 14:07:01 -04:00
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:
@@ -10,6 +10,7 @@
|
|||||||
#include <gui/control/package_list.hpp>
|
#include <gui/control/package_list.hpp>
|
||||||
#include <util/io/package_manager.hpp>
|
#include <util/io/package_manager.hpp>
|
||||||
#include <util/alignment.hpp>
|
#include <util/alignment.hpp>
|
||||||
|
#include <script/profiler.hpp>
|
||||||
|
|
||||||
DECLARE_TYPEOF_COLLECTION(PackagedP);
|
DECLARE_TYPEOF_COLLECTION(PackagedP);
|
||||||
|
|
||||||
@@ -64,9 +65,13 @@ void PackageList::showData(const String& pattern) {
|
|||||||
packages.clear();
|
packages.clear();
|
||||||
// find matching packages
|
// find matching packages
|
||||||
vector<PackagedP> matching;
|
vector<PackagedP> matching;
|
||||||
package_manager.findMatching(pattern, matching);
|
{
|
||||||
|
PROFILER(_("find matching packages"));
|
||||||
|
package_manager.findMatching(pattern, matching);
|
||||||
|
}
|
||||||
FOR_EACH(p, matching) {
|
FOR_EACH(p, matching) {
|
||||||
// open image
|
// open image
|
||||||
|
PROFILER(_("load package image"));
|
||||||
InputStreamP stream = p->openIconFile();
|
InputStreamP stream = p->openIconFile();
|
||||||
Image img;
|
Image img;
|
||||||
Bitmap bmp;
|
Bitmap bmp;
|
||||||
|
|||||||
Reference in New Issue
Block a user