I'm developing Asp.Net MVC website using Kendo UI.
Installed Visual Studio 2013 Update 2 RTM and got CPU issue on IIS (CPU >= 30%). http://c2n.me/i7juKB.png
After an hour of searching issue, found that the problem is in Kendo UI Treeview with hierarchical data.
Kendo Treeview Asp.Net MVC wrapper code:
@(Html.Kendo().TreeView().HtmlAttributes(new { style = "height:150px;" }) .Name("treeview-library-country")
.Events(events => events.Select("common.onTreeViewSelect").Collapse("common.onTreeViewCollapse").Expand("common.onTreeViewExpand"))
.Checkboxes(checkboxes => checkboxes.Name("RegionsCheckedNodes").CheckChildren(false)).BindTo(Model.Regions,
mappings => mappings.For<MyTreeViewItem>(binding => binding.ItemDataBound((item, i) =>
{
item.Text = i.Text;
item.Id = i.Id;
item.Checked = i.IsChecked;
}).Children(i => i.Items))))
TreeViewItem class
public class MyTreeViewItem
{
public bool IsChecked { get; set; }
public string Id { get; set; }
public string Text { get; set; }
public int Count { get; set; }
public string AdditionalInfo { get; set; }
public List<MyTreeViewItem> Items { get; set; }
}
Actual problem is in .Children(i => i.Items)
part of code.
When I have deleted it, everything became fine.
P.S. Website is working fine till page with treeview is loaded.
SOLVED
Just turned off Browser Link in Visual Studio.
来源:https://stackoverflow.com/questions/23657624/asp-net-cpu-issue-working-with-kendo-ui-treeview-after-visual-studio-2013-update