4.7 performance problem with asp.net custom control?
Has there been any reports of performance problems in V4.7 versus V4.61? I have a very small site that I have converted from 4.61 (that ran very fast), to v4.7 and most of the site runs the same, but the part of the site that uses an asp.net custom control runs on the order of 10 times slower.
It is a very small control, simply selects the top 5 posts and binds them to a datacontrol:
var dt = currentNode.ChildrenAsTable("BlogPost");
var query = from c in dt.AsEnumerable() orderby c["Post Date"] descending selectnew { PostDate = c.Field<string>("Post Date"), NodeName = c.Field<string>("NodeName"), Content = c.Field<string>("Body Text"), Tags = c.Field<string>("Tags"), Url = c.Field<string>("Url") };
//Databind example rptPosts.DataSource = from c in query.Take(PostCount) select c; rptPosts.DataBind();
Yes I know this could be done is XSLT (and in razor I am sure), but since I do plan on using asp.net in a lot of other places, I need to understand why the enormous slowdown in such a small bit of code...thoughts?
PS: I did the conversion by installing a clean 4.7 install with a clean database and manually moved each of the doctypes, templates, and content items over. Both sites are running on the same machine.
UPDATE: I think this has something to do with the caching, as I have ruled out just about everything I could think of. I rewrote the page using an inline razor macro instead, which works perfectly, but at first it ran at the exact same slow pace - then I added the 'cache="15" to the macro call and then it page performed how it did under 4.6 - i.e. very rapidly. Given that the uncached razor and the asp.net usercontrol both performed at the same slow speed, and the razor was fixed by caching, I am thinking that umbraco is not caching asp.net user controls the same in 4.7 as it did in 4.6, but I don't have proof. Open to suggestions on things I could try or check.
Has anyone got to the bottom of this yet? I am getting the same slow loading issue with a custom control. I have debugged the control and have found that the following line is causing the slow loading:
4.7 performance problem with asp.net custom control?
Has there been any reports of performance problems in V4.7 versus V4.61? I have a very small site that I have converted from 4.61 (that ran very fast), to v4.7 and most of the site runs the same, but the part of the site that uses an asp.net custom control runs on the order of 10 times slower.
It is a very small control, simply selects the top 5 posts and binds them to a datacontrol:
Yes I know this could be done is XSLT (and in razor I am sure), but since I do plan on using asp.net in a lot of other places, I need to understand why the enormous slowdown in such a small bit of code...thoughts?
PS: I did the conversion by installing a clean 4.7 install with a clean database and manually moved each of the doctypes, templates, and content items over. Both sites are running on the same machine.
UPDATE: I think this has something to do with the caching, as I have ruled out just about everything I could think of. I rewrote the page using an inline razor macro instead, which works perfectly, but at first it ran at the exact same slow pace - then I added the 'cache="15" to the macro call and then it page performed how it did under 4.6 - i.e. very rapidly. Given that the uncached razor and the asp.net usercontrol both performed at the same slow speed, and the razor was fixed by caching, I am thinking that umbraco is not caching asp.net user controls the same in 4.7 as it did in 4.6, but I don't have proof. Open to suggestions on things I could try or check.
Is that linq2umbraco?
Has anyone got to the bottom of this yet? I am getting the same slow loading issue with a custom control. I have debugged the control and have found that the following line is causing the slow loading:
DataTable loDataTableUnfiltered = currentPage.ChildrenAsTable("Cocktail");
is working on a reply...