New Posts New Posts RSS Feed: Slow Cache QueryStrategy
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Slow Cache QueryStrategy

 Post Reply Post Reply Page  <12
Author
jozza View Drop Down
Newbie
Newbie


Joined: 11-Jul-2007
Posts: 25
Post Options Post Options   Quote jozza Quote  Post ReplyReply Direct Link To This Post Topic: Slow Cache QueryStrategy
    Posted: 13-Nov-2007 at 2:52pm
Hi
 
In the current scenario, I go down to the database and retrieve scheduled leave records for 2000 employees for a given time period. As I understand it, these records are then put in the cache. I then have another  devforce query which has a querystrategy of CacheOnly. I then call this CacheOnly query for each personnel. It takes 80 seconds! I've checked SQL Profiler and devforce does NOT go back to the server (which is good).
 
80 seconds seems to me like a very long time in computer land, so I created another method which basically retrieves the 2000 employees and creates a Dictionary<string, EntityList<Leave>>. It now only takes 4 seconds to do the same task!
 
My question is: I was under the impression that caching should be blistering quick since it all happens in memory, why does there seem to be such a performance hit to go to the devforce cache?!?
 
Cheers.
Back to Top
 Post Reply Post Reply Page  <12

Forum Jump Forum Permissions View Drop Down