c# - EF6 ToListAsync does not run async but blocks the thread -


to increase page performance wanted run few queries asynchronously.
upgraded ef6 because natively supports feature exposing async methods.
couldn't queries fire simultaneously boiled code down simple example :

var sw = new stopwatch(); sw.start();  var dummy = context.set<ca_event_person>().take(200).tolistasync(); sw.stop(); logger.debug("attempt nr 1 : " + sw.elapsedmilliseconds); var result = await dummy; 

my exception stopwatch instantly stop since i'm doing await @ later point.
logger says 5000 milliseconds have passed on stopwatch meaning call performed synchronous instead of asynchronous.

got insight in why or doing wrong?

anyone got insight in why or doing wrong?

is first call ef in application? timing one-off building of internal representation of ef model?

with more complex ef model there significant overhead on first call. 1 off (per app domain) cost.

better time number of calls (and throw away shortest , longest times).


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -