Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • E.J. Brennan 73 posts 114 karma points
    Apr 21, 2011 @ 14:33
    E.J. Brennan
    0

    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
                            select new
                            {
                                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.

  • E.J. Brennan 73 posts 114 karma points
    Apr 21, 2011 @ 20:48
    E.J. Brennan
    0

    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.

  • Berto 105 posts 177 karma points
    Apr 21, 2011 @ 21:02
    Berto
    0

    Is that linq2umbraco?

  • Marc Love (uSkinned.net) 447 posts 1789 karma points
    Oct 03, 2011 @ 12:07
    Marc Love (uSkinned.net)
    0

    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");

Please Sign in or register to post replies

Write your reply to:

Draft