title: linq order by taking really long time
body: <p>I am kind of stuck again as I am unable to understand this. </p>
  
  <p>So I have a class named <code>CSVItem</code>:</p>
  
  <pre><code>public class CSVItem
  {
      public int SortedAccountNumber { get; set; }
      public DateTime Date { get; set; }
      public int SNO { get; set; }
      public string AccountNumber { get; set; }
      public double Value { get; set; }
      public int Year
      {
          get
          {
              if (Date.Month &gt; MainWindow.fiscalMonth)
              {
                  return Date.Year+1;
              }
              return Date.Year;
          }
      }
      public int StaticCounter { get { return 1; } }
  
      public CSVItem(string accNo, DateTime date, double value, int sNo)
      {
          Value = value;            
          Date = date;
          AccountNumber = accNo;
          SNO = sNo;
      }
  
  
  }
  </code></pre>
  
  <p>I read a CSV, and I make a List of Type CSV Item with about 500k items. Then I try to sort using the default Order By method of the list, and try to return the list from the sorted collection. Here is the code:</p>
  
  <pre><code>List&lt;CSVItem&gt; items = new List&lt;CSVItem&gt;();
  
   // ---- some code to read csv and load into items collection
  
   List&lt;CSVItem&gt; vItems = items.OrderBy(r1 =&gt; r1.AccountNumber).ThenBy(r1 =&gt; r1.Date).ToList();
  </code></pre>
  
  <p>It is like taking forever to sort and then convert the collection back to a list. Well I have certainly tried loading about a million records previously and never had such -no response- from Linq Sorting ever and it is kind of driving me crazy. Any help or suggestion on where I can look for finding the problem? </p>