Index: /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionVariableImpactsView.Designer.cs
===================================================================
--- /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionVariableImpactsView.Designer.cs	(revision 15726)
+++ /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionVariableImpactsView.Designer.cs	(revision 15727)
@@ -55,4 +55,5 @@
       this.dataPartitionComboBox = new System.Windows.Forms.ComboBox();
       this.variableImactsArrayView = new HeuristicLab.Data.Views.StringConvertibleArrayView();
+      this.backgroundWorker = new System.ComponentModel.BackgroundWorker();
       this.SuspendLayout();
       // 
@@ -169,4 +170,9 @@
       this.variableImactsArrayView.Size = new System.Drawing.Size(706, 278);
       this.variableImactsArrayView.TabIndex = 2;
+      // 
+      // backgroundWorker
+      // 
+      this.backgroundWorker.DoWork += new System.ComponentModel.DoWorkEventHandler(this.BackgroundWorker_DoWork);
+      this.backgroundWorker.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.BackgroundWorker_RunWorkerCompleted);
       // 
       // RegressionSolutionVariableImpactsView
@@ -203,4 +209,5 @@
     private System.Windows.Forms.ComboBox sortByComboBox;
     private System.Windows.Forms.CheckBox ascendingCheckBox;
+    private System.ComponentModel.BackgroundWorker backgroundWorker;
   }
 }
Index: /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionVariableImpactsView.cs
===================================================================
--- /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionVariableImpactsView.cs	(revision 15726)
+++ /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionVariableImpactsView.cs	(revision 15727)
@@ -23,5 +23,4 @@
 using System.Collections.Generic;
 using System.Linq;
-using System.Threading.Tasks;
 using HeuristicLab.Common;
 using HeuristicLab.Data;
@@ -32,4 +31,12 @@
   [Content(typeof(IRegressionSolution))]
   public partial class RegressionSolutionVariableImpactsView : DataAnalysisSolutionEvaluationView {
+    #region Nested Types
+    private class BackgroundWorkerArguments {
+      internal MainForm.WindowsForms.MainForm mainForm;
+      internal RegressionSolutionVariableImpactsCalculator.ReplacementMethodEnum replMethod;
+      internal RegressionSolutionVariableImpactsCalculator.FactorReplacementMethodEnum factorReplMethod;
+      internal RegressionSolutionVariableImpactsCalculator.DataPartitionEnum dataPartition;
+    }
+
     private enum SortingCriteria {
       ImpactValue,
@@ -37,7 +44,11 @@
       VariableName
     }
-
+    #endregion
+
+    #region Fields
     private Dictionary<string, double> rawVariableImpacts = new Dictionary<string, double>();
-
+    #endregion
+
+    #region Getter/Setter
     public new IRegressionSolution Content {
       get { return (IRegressionSolution)base.Content; }
@@ -46,5 +57,7 @@
       }
     }
-
+    #endregion
+
+    #region Ctor
     public RegressionSolutionVariableImpactsView()
       : base() {
@@ -55,10 +68,12 @@
       this.sortByComboBox.SelectedItem = SortingCriteria.ImpactValue;
 
+      //Set the default values
       this.dataPartitionComboBox.SelectedIndex = 0;
       this.replacementComboBox.SelectedIndex = 0;
       this.factorVarReplComboBox.SelectedIndex = 0;
     }
-
-    #region events
+    #endregion
+
+    #region Events
     protected override void RegisterContentEvents() {
       base.RegisterContentEvents();
@@ -86,5 +101,5 @@
         variableImactsArrayView.Content = null;
       } else {
-        UpdateVariableImpacts();
+        StartBackgroundWorker();
       }
     }
@@ -92,9 +107,9 @@
 
     private void dataPartitionComboBox_SelectedIndexChanged(object sender, EventArgs e) {
-      UpdateVariableImpacts();
+      StartBackgroundWorker();
     }
 
     private void replacementComboBox_SelectedIndexChanged(object sender, EventArgs e) {
-      UpdateVariableImpacts();
+      StartBackgroundWorker();
     }
 
@@ -123,8 +138,37 @@
       UpdateDataOrdering();
     }
-    #endregion
-
-    #region Helper Methods         
-    private void UpdateVariableImpacts() {
+
+
+    private void BackgroundWorker_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e) {
+      variableImactsArrayView.Caption = Content.Name + " Variable Impacts";
+
+      var argument = e.Argument as BackgroundWorkerArguments;
+      if (!(argument is BackgroundWorkerArguments)) {
+        throw new ArgumentException("Argument for Backgroundworker must be of type BackgroundworkerArguments");
+      }
+
+      argument.mainForm.AddOperationProgressToView(this, "Calculating variable impacts for " + Content.Name);
+      try {
+        //Remember the original ordering of the variables
+        var impacts = RegressionSolutionVariableImpactsCalculator.CalculateImpacts(Content, argument.dataPartition, argument.replMethod, argument.factorReplMethod);
+        var problemData = Content.ProblemData;
+        var inputvariables = new HashSet<string>(problemData.AllowedInputVariables.Union(Content.Model.VariablesUsedForPrediction));
+        var originalVariableOrdering = problemData.Dataset.VariableNames.Where(v => inputvariables.Contains(v)).Where(problemData.Dataset.VariableHasType<double>).ToList();
+
+        rawVariableImpacts.Clear();
+        originalVariableOrdering.ForEach(v => rawVariableImpacts.Add(v, impacts.First(vv => vv.Item1 == v).Item2));
+      } finally {
+        argument.mainForm.RemoveOperationProgressFromView(this);
+      }
+    }
+
+    private void BackgroundWorker_RunWorkerCompleted(object sender, System.ComponentModel.RunWorkerCompletedEventArgs e) {
+      UpdateDataOrdering();
+    }
+    #endregion
+
+    #region Helper Methods   
+    private void StartBackgroundWorker() {
+      //Check if the selection is valid
       if (Content == null) { return; }
       if (replacementComboBox.SelectedIndex < 0) { return; }
@@ -132,27 +176,19 @@
       if (factorVarReplComboBox.SelectedIndex < 0) { return; }
 
-      variableImactsArrayView.Caption = Content.Name + " Variable Impacts";
-
+      //Prepare arguments
       var mainForm = (MainForm.WindowsForms.MainForm)MainFormManager.MainForm;
       var replMethod = (RegressionSolutionVariableImpactsCalculator.ReplacementMethodEnum)replacementComboBox.Items[replacementComboBox.SelectedIndex];
       var factorReplMethod = (RegressionSolutionVariableImpactsCalculator.FactorReplacementMethodEnum)factorVarReplComboBox.Items[factorVarReplComboBox.SelectedIndex];
       var dataPartition = (RegressionSolutionVariableImpactsCalculator.DataPartitionEnum)dataPartitionComboBox.SelectedItem;
-
-      Task.Factory.StartNew(() => {
-        try {
-          mainForm.AddOperationProgressToView(this, "Calculating variable impacts for " + Content.Name);
-
-          //Remember the original ordering of the variables
-          var impacts = RegressionSolutionVariableImpactsCalculator.CalculateImpacts(Content, dataPartition, replMethod, factorReplMethod);
-          var problemData = Content.ProblemData;
-          var inputvariables = new HashSet<string>(problemData.AllowedInputVariables.Union(Content.Model.VariablesUsedForPrediction));
-          var originalVariableOrdering = problemData.Dataset.VariableNames.Where(v => inputvariables.Contains(v)).Where(problemData.Dataset.VariableHasType<double>).ToList();
-          rawVariableImpacts.Clear();
-          originalVariableOrdering.ForEach(v => rawVariableImpacts.Add(v, impacts.First(vv => vv.Item1 == v).Item2));
-          UpdateDataOrdering();
-        } finally {
-          mainForm.RemoveOperationProgressFromView(this);
-        }
-      });
+      var args = new BackgroundWorkerArguments() {
+        mainForm = mainForm,
+        replMethod = replMethod,
+        factorReplMethod = factorReplMethod,
+        dataPartition = dataPartition
+      };
+
+      //Let the backgroundWorker do his job (unless he's already running)
+      //fholzing: Possible bug -> A ContentChanged won't update the data if the backgroundworker is already running
+      if (!backgroundWorker.IsBusy) { backgroundWorker.RunWorkerAsync(args); }
     }
 
@@ -193,5 +229,9 @@
         ElementNames = orderedEntries.Select(i => i.Key)
       };
-      variableImactsArrayView.Content = (DoubleArray)impactArray.AsReadOnly();
+
+      //Could be, if the View was closed during the BackgroundWorker-run
+      if (!variableImactsArrayView.IsDisposed) {
+        variableImactsArrayView.Content = (DoubleArray)impactArray.AsReadOnly();
+      }
     }
     #endregion
