Running sites on “localhost” is extremely slow

后端 未结 18 1596
终归单人心
终归单人心 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:28

    I fixed this problem by editing config.inc.php file which is in phpmyadmin folder: specifically changed $cfg['Servers'][$i]['host'] = 'localhost' to $cfg['Servers'][$i]['host'] = '127.0.0.1'

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

    I was having the same issue, IIS initial loading would take up to 10 minutes instead of the usual 30 seconds.

    I opened up Task Manager to see what processes were running. Turns out Windows Defender would spike at 30% CPU usage when hitting the IIS endpoint for the first time. I tried excluding my /bin/ folders but that did not work, so I just disabled real-time protection on Windows Defender and voilà the site was loading in just 30 seconds.

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

    If you are just viewing the page output (not debugging code) then go to the Web.Config file and set debug to false. This changes load time from >15 secs to <1 sec

        <system.web>
            <compilation debug="false" strict="false" explicit="true" targetFramework="4.0" />
            ...
        </system.web>
    
    0 讨论(0)
  • 2020-12-12 22:33

    I had the same problem with PHP. I solved it by changing "localhost" to "127.0.0.1" in database connection parameters like someone suggested here: https://serverfault.com/a/444338/62739 . I think it may work for you too, give it a try.

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

    Disable the antivirus on the folders where is the code of the web application. In my case I have observed a big improvement with Avast antivirus.

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

    This suggestion fixed it for me. Clear out the WebSiteCache in C:\Users\username\AppData\Local\Microsoft\WebSiteCache

    http://blog.geocortex.com/2007/12/07/slow-visual-studio-performance-solved/

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