This project is read-only.

Not seeing performance gain

Nov 10, 2011 at 1:05 PM

I've installed the module on a production site, but I'm not observing any change in performance. There are no errors in the log.

This could of course lead to the conclusion that database queries aren't having any performance impact (although I find this hard to believe!)

What's the best way to check what the NHibernate cache is doing and confirm whether it's being used?

Also, I'm interested in trying out the query cache. I assume this involves changes to Orchard core but since I'm already running from a fork this isn't a problem - do you have those changes on a fork anywhere for me to look at?

Nov 10, 2011 at 1:17 PM

I found the two changes which add SetCachable (in content query and repository implementations) - is that everything at the moment? It seems to blow up parsing XML in IndexSettings...

Nov 16, 2011 at 9:15 PM

yes i have the same problem. we have a live server and a staging server and the performance is thanks to this module on the staging server very good. but on the live server it the module doesn't do anything and performance is poor. The only difference is that staging is a windows 2008 and the live is a windows 2008 r2. Let me know if you find something. on the live server i see the error:

on staging i don't receive errors. both run on full trust.

Nov 17, 2011 at 2:58 AM

Interesting ... my live server is R2 as well, I wonder if there's a problem with NHibernate and R2? I haven't seen that error though (although I'll have another check through the logs, there's been a fair bit of noise there lately though from updates and such).

By the way, the indexing problem I mentioned was only happening on my dev machine and I think it was just a coincidence that had nothing to do with the cache. It was still happening after I reverted the changes and I think it was a corrupt search index file.

Nov 17, 2011 at 10:31 AM

Yes i had the search index also. Just removed and let it rebuild and the error was gone.

let me hear if you find something for the cache problem.

Nov 17, 2011 at 12:00 PM

If it's an NHibernate issue then I guess we have to wait for NHibernate upgrade in Orchard.

Nov 18, 2011 at 3:22 PM

ok i've managed to make it faster by using the DeleteModuleBinaries.cmd from the orchard source on my live site.. Still not as fast as our test server.

Nov 27, 2011 at 5:33 PM

Hey guys sorry I didn't know these discussions were going on.  I absolutely want to dig into the issues but I haven't had time to really work on this.

Pete, I made some comments here on October 20th where I talk about what is and is not getting cached, basically the stuff that is really expensive (and probably the stuff that is heavily used in your modules) isn't getting cached for various reasons.

In terms of checking what is/is not being cached, I would recommend using NHibernate profiler.  There's a 30 day trial, and I was going to talk to ayende about donating some licenses for orchard devs trying to get this working optimally.  To get it to work, download that, and add a reference to HibernatingRhinos.Profiler.Appender.v4.0.dll in the Orchard.Web project.  In Orchard.Web -> Global.asax -> Application_Start, add this line:


I also had to comment out the last line is AssemblyInfo.cs ([assembly: SecurityTransparent] to stop it from throwing errors.

That should pop up and tell you when something is loaded from the caches.

Dec 9, 2011 at 1:30 PM

What about installing this module to help?

Dec 9, 2011 at 4:38 PM

Why did no-one point out that project to me before? ;)

Seriously, I've spent some hours the last day or two writing my own profiling system because I didn't get any of the commercial solutions to work satisfactorially. I figured an Orchard-centric solution would offer more meaningful results and allow detailed profiling of specific components. Should've looked around first! Might be able to combine some of what I've figured out with this, tho.