Base solution for your next web application
Open Closed

Site is very slow #7562


User avatar
0
sumitshah created

Hi,

We are using the latest version of ASPNETZERO and have created a website using the framework. The site takes more than 25seconds to load the login screen. Below is the performance graph and also the network traffic. We have not customized the login screen and using the default template.

This is very concerning, our application's performance needs to be almost instant. Please let me know what we should do to optimize the performance.

public site url: https://idmsvnext.infogroup.com


11 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @sumitshah

    Could you tell, how did you publish your Angular app ? As I can see, your main bundle is about 4.4 mb and it is a bit high.

  • User Avatar
    0
    sumitshah created

    Hi,

    Thank you for the quick response.

    Below are the steps, how we are deploying the website:

    1. We are publishing the web.host project(from visual studio 2017 professional edition)
    2. Similarly, we are using 'ng build --prod' command to publish the angular project
    3. Then zipping the files and sending it to the webserver
    4. On the webserver we are deploying the client and server as single website(by setting up localhost in the appsettings.production.json file)
    5. Below is the snippet of the config file:

    { "ConnectionStrings": { "Default": "Server=XX.XX.XX.XX; Database=TestDB; Trusted_Connection=False;User ID=TestUser;Password=xxxxx;" }, "App": { "ServerRootAddress": "https://localhost:XX", "ClientRootAddress": "https://localhost:XX/", "CorsOrigins": "https://localhost:XX/" } } 6) And below is the snippet of the appappconfig.production.json file

    { "remoteServiceBaseUrl": "https://idmsvnext.infogroup.com:XX", "appBaseUrl": "https://idmsvnext.infogroup.com:XX/", "localeMappings": { "angular": [ { "from": "pt-BR", "to": "pt" }, { "from": "zh-CN", "to": "zh" }, { "from": "he-IL", "to": "he" }, { "from": "es-MX", "to": "es" }, { "from": "vi", "to": "en" } ], "moment": [ { "from": "es-MX", "to": "es" }, { "from": "zh-Hans", "to": "zh-cn" }, { "from": "vi", "to": "en-gb" } ] } }

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Could you also share your Angular and angular-cli versions ? If they are not on the latest version, could you try to upgrade them ?

    There has been many improvements in Angular and angular-cli for decreasing the published bundle sizes.

    Thanks,

  • User Avatar
    0
    sumitshah created

    Hi, I upgraded to the latest version of angular and angular cli(8.3.2), earlier it was 8.0.1 and tried publishing the code again. but there seems to be hardly any change in the file size and so the performance. Below are the print screens

    Please suggest.

  • User Avatar
    0
    rvanwoezik created

    Hi, when i check your site i get this error: idmsvnext.infogroup.com/:1 Access to XMLHttpRequest at 'https://idmsvnext.infogroup.com/AbpUserConfiguration/GetAll?d=1567597791213' from origin 'http://idmsvnext.infogroup.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

    Hope this helps

    I've just published my Angular site to Azure, works normally:

    https://phoogle-client.azurewebsites.net

  • User Avatar
    0
    sumitshah created

    Thanks for the analysis, we have checked our website and its functioning all normal with slowness in loading the login form. We are not getting any CORS error. Could you please try the secure url i.e.

    https://idmsvnext.infogroup.com

    We have deployed our website on an on-premise server and it is not hosted in cloud. When deployed in azure cloud, it seems all the bundles are gzipped and cloud itself is taking care of unzipping/caching the bundle files.

    We checked the site you have deployed in azure and the bundle size for main.js is 4.5MB but it is cached. In our case the main.js is 4.4MB but evey time we are loading the landing page the file is getting downloaded and hence the slowness.

  • User Avatar
    0
    rvanwoezik created

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @sumitshah

    Is it possible for you to share your Angular app with [email protected] for us to analyze it ?

    Thanks,

  • User Avatar
    0
    sumitshah created

    Hi,

    we have decided to keep this issue on hold for a while as we have been busy working on other tasks. will send you the code as and when we are done with our on going release.

    Thank you for the help.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Thanks @sumitshah for your feedback. We can continue on email when you are ready, so closing the issue for now.

  • User Avatar
    0
    smry created

    We were having performance issues and I found this ticket

    one of the first comments didnt seem to make sense: "4.4 mb and it is a bit high."

    After some investigation I found we were having a compression issue. Our files now range about 1MB down from ~4.5MB

    For more info see: https://docs.microsoft.com/en-us/iis/extensions/iis-compression/iis-compression-overview