ObjectStore retrieval very slow

Vote:
 

I have some lines of code that access the ObjectStore and this takes a hughe amount of time! Its quite a big site with lots of pages and templates and pagetypes. However a page takes about 50ms to load without this three lines, but with them it takes 1500ms! So im wondering if there is another way of doing it that will make it faster?

session = Context.Repository.CreateSession();
var query = new Query();
result = session.ExecuteQueryObject<PageRefCount>(query).Take(5).ToList();

 

#64764
Jan 09, 2013 13:28
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.