Index: /branches/GeneralizedQAP/HeuristicLab.Optimizer/3.3/NewItemDialog.Designer.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Optimizer/3.3/NewItemDialog.Designer.cs	(revision 6747)
+++ /branches/GeneralizedQAP/HeuristicLab.Optimizer/3.3/NewItemDialog.Designer.cs	(revision 6748)
@@ -49,8 +49,12 @@
       this.cancelButton = new System.Windows.Forms.Button();
       this.itemsListView = new System.Windows.Forms.ListView();
-      this.nameColumnHeader = new System.Windows.Forms.ColumnHeader();
-      this.descriptioncolumnHeader = new System.Windows.Forms.ColumnHeader();
+      this.nameColumnHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+      this.versionColumnHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+      this.descriptioncolumnHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
       this.toolTip = new System.Windows.Forms.ToolTip(this.components);
-      this.versionColumnHeader = new System.Windows.Forms.ColumnHeader();
+      this.loadingPanel = new System.Windows.Forms.Panel();
+      this.pleaseWaitLabel = new System.Windows.Forms.Label();
+      this.loadingProgressBar = new System.Windows.Forms.ProgressBar();
+      this.loadingPanel.SuspendLayout();
       this.SuspendLayout();
       // 
@@ -102,18 +106,43 @@
       // nameColumnHeader
       // 
-      this.nameColumnHeader.DisplayIndex = 0;
       this.nameColumnHeader.Text = "Name";
       this.nameColumnHeader.Width = 91;
       // 
+      // versionColumnHeader
+      // 
+      this.versionColumnHeader.Text = "Version";
+      // 
       // descriptioncolumnHeader
       // 
-      this.descriptioncolumnHeader.DisplayIndex = 2;
       this.descriptioncolumnHeader.Text = "Description";
       this.descriptioncolumnHeader.Width = 190;
       // 
-      // versionColumnHeader
+      // loadingPanel
       // 
-      this.versionColumnHeader.DisplayIndex = 1;
-      this.versionColumnHeader.Text = "Version";
+      this.loadingPanel.Controls.Add(this.pleaseWaitLabel);
+      this.loadingPanel.Controls.Add(this.loadingProgressBar);
+      this.loadingPanel.Location = new System.Drawing.Point(37, 153);
+      this.loadingPanel.Name = "loadingPanel";
+      this.loadingPanel.Size = new System.Drawing.Size(550, 106);
+      this.loadingPanel.TabIndex = 4;
+      // 
+      // pleaseWaitLabel
+      // 
+      this.pleaseWaitLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.pleaseWaitLabel.Location = new System.Drawing.Point(44, 59);
+      this.pleaseWaitLabel.Name = "pleaseWaitLabel";
+      this.pleaseWaitLabel.Size = new System.Drawing.Size(462, 23);
+      this.pleaseWaitLabel.TabIndex = 1;
+      this.pleaseWaitLabel.Text = "Loading items, please wait...";
+      this.pleaseWaitLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+      // 
+      // loadingProgressBar
+      // 
+      this.loadingProgressBar.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.loadingProgressBar.Location = new System.Drawing.Point(44, 32);
+      this.loadingProgressBar.Name = "loadingProgressBar";
+      this.loadingProgressBar.Size = new System.Drawing.Size(462, 23);
+      this.loadingProgressBar.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
+      this.loadingProgressBar.TabIndex = 0;
       // 
       // NewItemDialog
@@ -124,4 +153,5 @@
       this.CancelButton = this.cancelButton;
       this.ClientSize = new System.Drawing.Size(624, 444);
+      this.Controls.Add(this.loadingPanel);
       this.Controls.Add(this.itemsListView);
       this.Controls.Add(this.cancelButton);
@@ -137,4 +167,5 @@
       this.Load += new System.EventHandler(this.NewItemDialog_Load);
       this.Shown += new System.EventHandler(this.NewItemDialog_Shown);
+      this.loadingPanel.ResumeLayout(false);
       this.ResumeLayout(false);
 
@@ -150,4 +181,7 @@
     private System.Windows.Forms.ColumnHeader descriptioncolumnHeader;
     private System.Windows.Forms.ColumnHeader versionColumnHeader;
+    private System.Windows.Forms.Panel loadingPanel;
+    private System.Windows.Forms.Label pleaseWaitLabel;
+    private System.Windows.Forms.ProgressBar loadingProgressBar;
   }
 }
Index: /branches/GeneralizedQAP/HeuristicLab.Optimizer/3.3/NewItemDialog.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Optimizer/3.3/NewItemDialog.cs	(revision 6747)
+++ /branches/GeneralizedQAP/HeuristicLab.Optimizer/3.3/NewItemDialog.cs	(revision 6748)
@@ -22,5 +22,7 @@
 using System;
 using System.Collections.Generic;
+using System.Drawing;
 using System.Linq;
+using System.Threading.Tasks;
 using System.Windows.Forms;
 using HeuristicLab.Core;
@@ -42,10 +44,25 @@
       item = null;
       InitializeComponent();
+      SetEnabledStateOfControls();
     }
 
     private void NewItemDialog_Load(object sender, EventArgs e) {
+      TaskScheduler context = TaskScheduler.FromCurrentSynchronizationContext();
+      Task.Factory
+        .StartNew((Action<object>)LoadItems, context)
+        .ContinueWith(PrepareUI);
+    }
+
+    private void NewItemDialog_Shown(object sender, EventArgs e) {
+      item = null;
+    }
+
+    private void LoadItems(object state) {
+      TaskScheduler context = (TaskScheduler)state;
       if (!initialized) {
-        var categories = from t in ApplicationManager.Manager.GetTypes(typeof(IItem))
-                         where CreatableAttribute.IsCreatable(t)
+        Type[] creatableTypes = (from t in ApplicationManager.Manager.GetTypes(typeof(IItem))
+                                 where CreatableAttribute.IsCreatable(t)
+                                 select t).ToArray();
+        var categories = from t in creatableTypes
                          orderby CreatableAttribute.GetCategory(t), ItemAttribute.GetName(t), ItemAttribute.GetVersion(t) ascending
                          group t by CreatableAttribute.GetCategory(t) into c
@@ -53,25 +70,45 @@
 
         itemsListView.SmallImageList = new ImageList();
+        int count = 0;
+        ListViewItem[] itemsArray = new ListViewItem[creatableTypes.Length];
+        Image[] smallImagesArray = new Image[creatableTypes.Length];
+        List<ListViewGroup> itemGroupsList = new List<ListViewGroup>();
         foreach (var category in categories) {
           ListViewGroup group = new ListViewGroup(category.Key);
-          itemsListView.Groups.Add(group);
+          itemGroupsList.Add(group);
           foreach (var creatable in category) {
             IItem i = (IItem)Activator.CreateInstance(creatable);
             items.Add(i);
             ListViewItem item = new ListViewItem(new string[] { i.ItemName, i.ItemVersion.ToString(), i.ItemDescription }, group);
-            itemsListView.SmallImageList.Images.Add(i.ItemImage);
-            item.ImageIndex = itemsListView.SmallImageList.Images.Count - 1;
+            item.ImageIndex = count;
             item.Tag = i;
-            itemsListView.Items.Add(item);
+            itemsArray[count] = item;
+            smallImagesArray[count] = i.ItemImage;
+            count++;
+            Task.Factory.StartNew(() => {
+              loadingProgressBar.Value = (int)Math.Round(loadingProgressBar.Minimum + (loadingProgressBar.Maximum - loadingProgressBar.Minimum) * (double)count / creatableTypes.Length);
+            }, Task.Factory.CancellationToken, TaskCreationOptions.None, context);
           }
         }
-        for (int i = 0; i < itemsListView.Columns.Count; i++)
-          itemsListView.Columns[i].AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
+        Task.Factory.StartNew(() => {
+          itemsListView.SmallImageList.Images.AddRange(smallImagesArray);
+          itemsListView.Groups.AddRange(itemGroupsList.ToArray());
+          itemsListView.Items.AddRange(itemsArray);
+          for (int i = 0; i < itemsListView.Columns.Count; i++)
+            itemsListView.Columns[i].AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
+        }, Task.Factory.CancellationToken, TaskCreationOptions.None, context);
         initialized = true;
       }
     }
 
-    private void NewItemDialog_Shown(object sender, EventArgs e) {
-      item = null;
+    private void PrepareUI(Task t) {
+      SetEnabledStateOfControls();
+      loadingPanel.Visible = false;
+    }
+
+    private void SetEnabledStateOfControls() {
+      itemsListView.Enabled = initialized;
+      okButton.Enabled = initialized;
+      cancelButton.Enabled = initialized;
     }
 
