My website is so slow RRS feed

  • Question

  • User2131089582 posted

    I have released website using asp mvc Framework here is the link MySite . But i have problem with my site, my site is very slow to load, i don't like this so tried to find solution like enabling Gzip, bundling the css and js. I have already tested my website using this too; https://gtmetrix.com/reports/fatihululum.site/W60NMkxK as you can see this the speed score is bad and the load time is more than 3S

    So can you help me what make my website is so slow. Yes i buy hosting in vultr.com and below is spesification of my hosting 

    I hope you can help me to find what the problem is, Thanks

    Saturday, December 29, 2018 5:04 PM

All replies

  • User-474980206 posted

    you're right, its wicked slow. 

    its mostly server side. it takes over 4 seconds to ship a small page (7.3kb). all downloads after the initial download are ok (you do have complex CSS that causes re-rendering - but this is trivial to how long the initial load takes). 

    you will need to determine what your page is doing during the request. why does it take over 4 seconds? if you use server profiling you will probably find all the time is in the action method. are you calling other services? slow database calls? currently your bundling and gzip are all fixes after the fact. you need to make the action faster. I'd shoot for 100-200 ms instead of the 4,200+ ms it takes now. if you are calling SQL, i'd shoot for < 100ms for the query (actually 50ms seems plenty for the amount of data returned). 

    once you fix the server problem, use the chrome debugger to clean up other performance. 

    Sunday, December 30, 2018 1:09 AM
  • User2131089582 posted

    Thanks for your reply, 

    So you mean that the problem is from my action or my code ?

    Sunday, December 30, 2018 7:56 AM
  • User2131089582 posted

    Here is my code that show homepage which i saved in github feel free to review it Code

    Sunday, December 30, 2018 8:01 AM
  • User-474980206 posted
    My guess is the method SetViewBag() takes over 4 seconds to run. You will need to profile it figure out what is taking so long. Bad scheme, bad queries or poor indexing or all. You also may need to combine queries into a batch.

    With the correct queries, scheme and indexes, I’d think you should be able to get the queries to under 100ms, but 50ms seems doable.

    Monday, December 31, 2018 4:02 AM
  • User2131089582 posted

    Hi There Please check the current speed I have already reduce to make calls of sql, is it better ? or is it still slow 

    Monday, December 31, 2018 7:22 AM
  • User1520731567 posted

    Hi hocamahdi99,

    Firstly,I suggest you could optimize image size based on tips from the site.

    Then.I test you website,I find it took about 1.78s.

    Analysis of this 1.78s needs to analyze your background code.

    As I can see in your Index action:

            public async Task<ActionResult> Index()
                await SetViewBag();
                await RecentComments();
                await TopContributor();
                return View("Index");

    You have used three function in it.

    I suggest you could use performance analysis tools to specifically test these methods.

    Best Regards.

    Yuki Tao

    Tuesday, January 1, 2019 6:12 AM
  • User-474980206 posted

    Hi There Please check the current speed I have already reduce to make calls of sql, is it better ? or is it still slow 

    only you can decide if its too slow. it still takes almost 2 seconds to process the action, which seems slow. you should profile your sql. you are probably getting scans.

    Wednesday, January 2, 2019 3:15 PM
  • User2131089582 posted

    can you guide me ho t use sql profler Thanks

    Wednesday, January 2, 2019 4:35 PM