Running sites on “localhost” is extremely slow

后端 未结 18 1595
终归单人心
终归单人心 2020-12-12 22:06

Having real trouble using my localhost to test sites. It runs extremely slowly! Sometimes it takes up to a minute to load a page. I\'m using Firefox and the sites I\'m testi

相关标签:
18条回答
  • 2020-12-12 22:11

    If your using .Net then turning off debug in your Web.Config is going to improve performance no end.

    <compilation defaultLanguage="c#" debug="false" batch="false" targetFramework="4.0">
    
    0 讨论(0)
  • 2020-12-12 22:11

    In my case, originally the following error was occurring:

    Cannot read configuration file due to insufficient permissions

    I fixed the error by using the proposed solution and restarted the application through IIS Manager. The original error was gone but the application was taking forever to load. I gave the permissions to IIS_IUSRS again but this time to the whole deployment folder. After this, the application was able to load though an error was showing up:

    This configuration section cannot be used at this path

    After resolving the above-mentioned error using the solution, the application was finally loading without giving any error.

    0 讨论(0)
  • 2020-12-12 22:14

    For people using a mac. When you're using different host names say test.local and test2.local. Try changing test.local to test.dev. I found out that Mac OS X lion controls the .local tld. So when you change it to something else it's faster.

    And of course use above suggestions like turning off the ipv6 reference in your hosts file:
    #::1 localhost

    and setting this in the hosts file: 127.0.0.1 localhost

    so it points to ipv4.

    0 讨论(0)
  • 2020-12-12 22:14

    After building your project the website needs some time to walk through the new dll :). It's normal that loading a webpage after rebuilding takes some time. This shouldn't happen when only changing something in for example javascript.

    0 讨论(0)
  • 2020-12-12 22:15

    Just Sharing my solution... i changed the url in my browser from localhost:port to 127.0.0.1:port which resulted in very fast loading

    0 讨论(0)
  • 2020-12-12 22:15

    Run the Process Monitor to see what resources(Network, File, Registry, Threads) are being consumed and see any unnecessary resource(remote https, costly file reads) are being consumed

    I had similar problem. When I run the process monitor I found that my fusion log is enabled so there are many into the disk which delayed the loading of dll after disabling fusion log IIS Express it is faster.

    0 讨论(0)
提交回复
热议问题