Navigation Cache Module Released

Topics: Announcements
Jun 18, 2013 at 6:53 PM
Edited Jun 26, 2013 at 10:15 AM
Trying to speed up your Orchard website?

Rework.NavigationCache developed out of my analysis (using MiniProfiler) of the slowest performance factor on my websites being the navigation. If you have a small website, this may not be an issue for you. However, if you are building a larger website, want to take advantage of breadcrumbs, and just plain want to speed up your site this module may be fore you. On my sites it shaved off more than 2 seconds.

Here is the link where you can grab source code from: https://navigationcache.codeplex.com/

I welcome contributions/suggestions for improvements (and even alternatives to keep Orchard fast).
Coordinator
Jun 26, 2013 at 5:29 AM
This sounds interesting. Do you think that should be integrated into core?
Jun 26, 2013 at 10:25 AM
I have thrown in the link to the codeplex site where the source is hosted as that should have been listed. Regarding core, yes, I think the concept should be integrated into core but the exact code probably not. I need a more creative mind to consider options as, right now, I need to implement a deep clone option to have a full menu copy saved in cache and deep clones are too easily broken / hard to maintain. Apparently, even my deep clone is not quite deep enough as the module needs to grab a "fresh copy" of the menu for the HTML Menu Content Item from the database (otherwise will throw an issue about initiating a new connection, which most host servers don't allow).

Summary: I don't want to belittle the value of the module, I use on all my websites to increase performance and it is fantastic. Just would want to consider additional areas of improvement (which I am sure can be readily done once we are willing to change core). Glad to help in the effort if it is deemed valuable.
Coordinator
Jun 27, 2013 at 12:16 AM
Thanks. You might want to open a bug to track this.
Coordinator
Jun 27, 2013 at 12:47 AM
Why not simply using SysCache ?
Jun 27, 2013 at 2:04 AM
I use both SysCache and Cache but neither of these seem to bring about the results compared to using them in conjunction with the above module for caching navigation menu widgets.

The Cache module works well when the full page is cached but the first time every page loads can still be slow because of the menus. With the module above, the menus are cached across all pages so only the very first page visited is slower. Even then, if another anonymous user has already cached the menu even the first page won't be slow. In addition, the module also allows authenticated users to have their own cached menus so even authenticated users will benefit from using the module (whereas Cache module doesn't have this allowance, for good reasons unless the cache could be customized to the user).

I don't know a lot about SysCache (though as I understand it, it is database level caching using nhibernate caching). It seems it would (and probably does) help a lot by caching the SQL calls to the database. My tests still showed that the navigation system was my slowest point (which is why I implemented the above module).

Would love to hear if SysCache could "do it all" as I am all for improving website performance.
Jun 27, 2013 at 2:06 PM
Bug has been filed at this link https://orchard.codeplex.com/workitem/19839