Copied to clipboard

Flag this post as spam?

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


  • Dervis 17 posts 147 karma points
    Oct 17, 2018 @ 19:23
    Dervis
    0

    Why my deployed umbraco website is very slow?

    Hi all,

    I have a deployed site. And the web site is incredibly slow. I can't understand why. This is not normal. I feel a little slowness when I run it as a local. But this slowness is not the same as the deployed version. I'm doing this when I'm navigating through the page. Is this an incorrect use?

      <li>
                                                <a href="@Umbraco.Field("#linkUrunlerankastreFirinlar")"
                                                   class="@(CurrentPage.Url == "/tr-TR/urunler/ankastre-firinlar" || CurrentPage.Url == "/en/urunler/ankastre-firinlar" || CurrentPage.Url == "/ru/urunler/ankastre-firinlar" ? "active" : "")">@Umbraco.Field("#ankastreFirinlar")</a>
                                            </li>
                                            <li>
                                                <a href="@Umbraco.Field("#linkUrunlerankastreOcaklar")"
                                                   class="@(CurrentPage.Url == "/tr-TR/urunler/ankastre-ocaklar" || CurrentPage.Url == "/en/urunler/ankastre-ocaklar" || CurrentPage.Url == "/ru/urunler/ankastre-ocaklarr" ? "active" : "")">@Umbraco.Field("#ankastreOcaklar")</a>
                                            </li>
                                            <li>
                                                <a href="@Umbraco.Field("#linkUrunlerankastreDavlumbazlar")"
                                                   class="@(CurrentPage.Url == "/tr-TR/urunler/ankastre-davlumbazlar" || CurrentPage.Url == "/en/urunler/ankastre-davlumbazlar" || CurrentPage.Url == "/ru/urunler/ankastre-davlumbazlar" ? "active" : "")">@Umbraco.Field("#ankastreDavlumbazlar")</a>
                                            </li>
                                            <li>
                                                <a href="@Umbraco.Field("#linkUrunlerankastreMikrodalga")"
                                                   class="@(CurrentPage.Url == "/tr-TR/urunler/ankastre-mikrodalga" || CurrentPage.Url == "/en/urunler/ankastre-mikrodalga" || CurrentPage.Url == "/ru/urunler/ankastre-mikrodalga" ? "active" : "")">@Umbraco.Field("#ankastreMikrodalgalar")</a>
                                            </li>
                                            <li>
                                                <a href="@Umbraco.Field("#linkUrunlerankastreBulasikMakinesi")"
                                                   class="@(CurrentPage.Url == "/tr-TR/urunler/ankastre-bulasik-makinesi" || CurrentPage.Url == "/en/products/dishwashers" || CurrentPage.Url == "/ru/urunler/ankastre-bulasik-makinesi" ? "active" : "")">@Umbraco.Field("#ankastreBulasikMakinesi")</a>
                                            </li>
                                            <li>
                                                <a href="@Umbraco.Field("#linkUrunlerankastreKuzineFirinlar")"
                                                   class="@(CurrentPage.Url == "/tr-TR/urunler/ankastre-kuzine-firinlar" || CurrentPage.Url == "/en/urunler/ankastre-kuzine-firinlar" || CurrentPage.Url == "/ru/urunler/ankastre-kuzine-firinlar" ? "active" : "")">@Umbraco.Field("#ankastreKuzineFrinlar")</a>
                                            </li>
    

    There's more like that. Do you think that could be the cause?

    I'm using Umbraco 7. Database comes from the remote server. You can check. parketin.com

    Do you have any idea what might be the reason for this?

  • Søren Mastrup 122 posts 564 karma points c-trib
    Oct 17, 2018 @ 19:37
    Søren Mastrup
    0

    I don’t think your example would be the cause of what you are experiencing. I think you should take a look on where you are traversing through you content tree. Looking at your main menu would be a good place to start.

  • Dervis 17 posts 147 karma points
    Oct 18, 2018 @ 07:22
    Dervis
    0

    Hi Søren,

    I scanned my code as you said. There's no problem. I don't understand where the problem ? Can't I research what Umbraco is doing in the backend or what could be causing it?

  • Søren Mastrup 122 posts 564 karma points c-trib
    Oct 18, 2018 @ 07:56
    Søren Mastrup
    2

    Hi Dervis,

    Is the backoffice running slow aswell?

    Try activating the miniprofiler and then load your frontpage.
    That should give you an indication on where to look and what calls is too expensive.
    This blogpost describes how to activate the miniprofiler

    Could you show how you are looping over your navigation?
    Excessive use of CurrentPage.Descendants could be rather expensive if you have a lot of nodes.

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Oct 18, 2018 @ 08:13
  • Dervis 17 posts 147 karma points
    Oct 18, 2018 @ 08:30
    Dervis
    0

    Thank you very much I will examine it in detail

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Oct 18, 2018 @ 08:19
    Dan Diplo
    1

    Try profiling your slow pages. You'll need to have debugging in web.config enabled (ie. debug='true') and then you can append the following query string to your URL to open the profiler:

    ?umbdebug=true
    

    eg. http://www.example.com/slowpage/?umbdebug=true

    Look in top right of your page and you can see a profiler that gives you execution time of queries etc.

  • Dervis 17 posts 147 karma points
    Oct 18, 2018 @ 08:36
    Dervis
    0

    I did what you said. Situations look very bad. Can you lead me in this situation?

    http://parketin.com/mini-profiler-resources/results?id=ef97b462-00b6-40de-bf62-2689a0284195

    In most of the pages the results are like this

    enter image description here

    thank you Søren and Dan

  • Søren Mastrup 122 posts 564 karma points c-trib
    Oct 18, 2018 @ 08:38
    Søren Mastrup
    0

    My guess is that you are looping over something in the view Yenilikler.cshtml.
    If so, could you share the foreach-loop you have in that file?

  • Dervis 17 posts 147 karma points
    Oct 18, 2018 @ 08:53
    Dervis
    0

    @Umbraco.Web.Mvc.UmbracoTemplatePage @inherits Umbraco.Web.Mvc.UmbracoViewPage @{ Layout = null;

        var items = Model.GetPropertyValue<IEnumerable<IPublishedContent>>("Yenilik");
        var myList = items.ToList();
    }
    <!DOCTYPE html>
    <html lang="@Culture">
    
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
        <link rel="stylesheet" href="/css/fonts.css">
        <link rel="stylesheet" href="/css/app.css">
        <link href="~/css/flickity.css" rel="stylesheet" />
        <title>Simfer | @Model.Name</title>
    </head>
    
    <body>
        @Html.Partial("Header")
        <div class="wrapper has-roof">
            <div class="container">
                <div class="page-image">
                    <img src="@Umbraco.Media(Model.GetPropertyValue("Jumbotron").ToString()).Url" alt="">
                </div>
                <div class="flexbox direction-column content kesfet top-gutter no-side visible-false-main">
                    <div class="items">
                        @{ if (items != null)
                            {
                                for (int item = 0; item < items.Count(); item++)
                                {
    
                                    <div class="item active">
                                        <div class="image bc-image top-right" style="background-image: url(@Umbraco.Media(myList[item].GetPropertyValue("ImageKesfet").ToString()).Url)">
                                        </div>
                                        <h1 class="title">@myList[item].GetPropertyValue("TitleKesfet").ToString()</h1>
                                        <p class="description">@myList[item].GetPropertyValue("DescriptionKesfet").ToString()</p>
                                    </div>
                                }
                            }
                        }
                    </div>
                </div>
    
            </div>
    
            @Html.Partial("Footer")
    
    <script src="/js/app.js"></script>
    <script src="~/js/flickity.pkgd.min.js"></script>
    </body>
    </html>
    

    Thats all.

    I think the whole problem stems from the header part. Because all the routing menus are located in the header partial. I would show you if you want to see the header partial.

  • MuirisOG 382 posts 1284 karma points
    Oct 19, 2018 @ 15:51
    MuirisOG
    1

    Sorry, only have time for a quick look, but the var myList = items.ToList(); line might be killing it.

    Do you need that?

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Oct 19, 2018 @ 20:06
    Dan Diplo
    1

    I doubt it's going to make a big difference, but he could definitely remove the ToList() and then simply use a foreach statement to iterate the items collection.

  • Dervis 17 posts 147 karma points
    Oct 21, 2018 @ 15:08
    Dervis
    100

    Many thanks to everyone, but the problem was with the server. I changed my web hosting and everything works very well.

Please Sign in or register to post replies

Write your reply to:

Draft