title: Performance issue in windows 10 compared with Windows 7
body: <p>I have a program developed in VB.Net. A specific operation in the application uses memory(arrays) to store the details. We use threading in the application.</p>
  
  <p>The application was running perfectly around 15 mins in Windows 7 OS.<br>
  The problem started when we have migrated into new OS i.e. Windows 10.</p>
  
  <p>It takes around 11 hours to complete the same operation which looks abnormal in any kind of application.</p>
  
  <p>Can any one help me out this to sort this down?</p>
  
  <p>Sys Config:<br></p>
  
  <blockquote>
    <p>Windows 10: Intel(R) Core(TM) i5-7500T CPU @ 2.70GHz 2.71GHz, 8GB RAM,
    4 Core<br> Windows 7:  Intel(R) Core(TM) i3 CPU 550 @ 3.20GHz 3.20GHz,
    4GB RAM, 4 Core.<br></p>
  </blockquote>
  
  <p>The code which taking more time to get execute is added here:<br></p>
  
  <pre><code>Private Sub ComputeAverageMark(ByVal ExamAndMarkDS As DataSet, ByRef ErrorDetailsObj As ErrorDetails)
      Try
          Dim ExamValue As New Exam
          Dim ExamForAnalysisValue As New ExamForAnalysis
          Dim ExamDT As New DataTable
          Dim ExamListArgsValue As ExamListArgs
          Dim MarkDT As New DataTable
          Dim count As Integer = 0
          Dim ExamListArgsList As New List(Of ExamListArgs)
  
          ExamDT = ExamAndMarkDS.Tables(0)
          MarkDT = ExamAndMarkDS.Tables(2)
  
          Dim MarkHashTable As Hashtable = GetMarkHashTable(MarkDT)
  
          For Each ExamDR As DataRow In ExamDT.Rows
  
              count = count + 1
              If MarkHashTable.ContainsKey(ExamDR.Item("ExamName")) Then
                  MarkDT = MarkHashTable(ExamDR.Item("ExamName"))
              Else
                  MarkDT = MarkDT.Clone
              End If
  
              ExamListArgsValue = New ExamListArgs(ExamDR, False, MarkDT, True, 1, ErrorDetailsObj)
  
              ExamListArgsList.Add(ExamListArgsValue)
  
              If count &gt;= 100 Then
                  Dim paralleOptions As New ParallelOptions
                  paralleOptions.MaxDegreeOfParallelism = 4
  
                  Parallel.ForEach(ExamListArgsList.ToArray, paralleOptions, Sub(ExamListArgs)
                                                                                  ComputeAverageMark(ExamListArgs)
                                                                              End Sub)
                  ExamListArgsList.Clear()
                  count = 0
              End If
  
          Next
  
          If count &gt; 0 AndAlso count &lt; 100 Then
              Dim paralleOptions As New ParallelOptions
              paralleOptions.MaxDegreeOfParallelism = 4
              Parallel.ForEach(ExamListArgsList.ToArray, paralleOptions, Sub(ExamListArgs)
                                                                                  ComputeAverageMark(ExamListArgs)
                                                                              End Sub)
          End If
  
      Catch ex As Exception
          Throw ex
      End Try
  End Sub
  </code></pre>