This is a migrated thread and some comments may be shown as answers.

[Solved] Menu Performance Problem

1 Answer 90 Views
Menu
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Kadir
Top achievements
Rank 1
Kadir asked on 13 Jun 2012, 08:56 PM


Hi,

I am using MVC menu in my project and Nhibernate. I have one performance  problem about menu rendering slowing problem.

Before, the topic is about one solution is suggested on below forum thread:
http://www.telerik.com/community/forums/aspnet-mvc/menu/performance-problem-with-menu-resolved.aspx 
  
There is my menu code part:

.ItemDataBound((item, menuModel) =>
                    {
                        if (menuModel.ActionName != null)
                        {
                            item.ActionName = menuModel.ActionName;
                        }

                        item.Text = menuModel.Description;

                        if (menuModel.ControllerName != null)
                        {
                            item.ControllerName = menuModel.ControllerName;
                        }
                    })

I detected the problem but i didnt solved it. 
The problem is below code parts:

If I set both item.ActionName  and item.ControllerName, it works so slow.
item.ActionName = menuModel.ActionName; 
item.ControllerName = menuModel.ControllerName; 

If I set only item.ActionName  , it works on normal performance.
item.ActionName = menuModel.ActionName; 
//item.ControllerName = menuModel.ControllerName;  

If I set only item.ControllerName  , it works on normal performance.
//item.ActionName = menuModel.ActionName; 
item.ControllerName = menuModel.ControllerName;   

I dont remove NHibernate from my project as above solution.
If the problem is about NHibernate, What can i do? 

1 Answer, 1 is accepted

Sort by
0
Kadir
Top achievements
Rank 1
answered on 19 Jun 2012, 07:27 AM
I solved above problem so i want to share my solution there. If anyone are suffering from that problem, maybe it helps. 

I think, problem's reason is a dll conflict. So I moved Nhibernate.dll to GAC (Global Assembly Cache) then remove Nhibernate.dll in bin.
I set reference type  to local copy = false; 

Now, menu is rendering normally on expected time.
Tags
Menu
Asked by
Kadir
Top achievements
Rank 1
Answers by
Kadir
Top achievements
Rank 1
Share this question
or