title: Reading thousands of objects with EF Core FAST
body: <p>I am reading 40,000 small objects / rows from SQLite with EF core, and it's taking 18 seconds, which is too long for my UWP app. 
  When this happens CPU usage on a single core reaches 100%, but the disk reading speed is circa 1%. </p>
  
  <pre><code>var dataPoints =  _db.DataPoints.AsNoTracking().ToArray();
  </code></pre>
  
  <p>Without <code>AsNoTracking()</code> the time taken is even longer. </p>
  
  <p><code>DataPoint</code> is a small POCO with a few primitive properties. Total amount of data I am loading is 4.5 MB. </p>
  
  <pre><code>    public class DataPointDto
      {
          [Key]
          public ulong Id { get; set; }
  
          [Required]
          public DateTimeOffset TimeStamp { get; set; }
  
          [Required]
          public bool trueTime { get; set; }
  
          [Required]
          public double Value { get; set; }
     }
  </code></pre>
  
  <p><strong>Question:</strong> Is there a better way of loading this many objects, or am I stuck with this level of performance?  </p>
  
  <p><strong>Fun fact:</strong> x86 takes 11 seconds, x64 takes 18. 'Optimise code' shaves off a second. Using <code>Async</code> pushes execution time to 30 seconds. </p>