I own rubberduckvba.com; the website is built in C# 6.0 using ASP.NET MVC. I'm not very literate as far as web dev goes, but debugging locally runs with acceptable performance, but once deployed accessing the website [regularly, but not always] takes forever, and running the sample code inspection on the /inspections/list page takes over a minute to yield the inspection results - but on my localhost I consistently get them in under 15 seconds... and the actual VBE add-in in its "natural" environment processes that sample code in a matter of milliseconds.
Did I setup something wrong? How do I go about diagnosing it? Is it normal that my localhost performs better than a web server made for this?
If it's any use, the source code can be found on GitHub.
Hi there @rubberduckvba,
I typically do not use ASP but the concept should be similar. You need to think about the factors that could take into effect. Connecting to your local development may not require each of your request to be resolved by DNS thus reducing latency caused by overhead significantly. There is also the factor of how far you are from the server you're trying to connect to.
As far as performance go, shared hosting typically have limited resources and are constantly being throttled to prevent your apps from locking up your neighbors. This includes database queries. You have to think about your your server's and localhost's specs as well.
If your localhost has a 4.8 Ghz octacore CPU with hyperthreading, 64Gb 3200Mhz RAM, and 1M IOPS SSD and your server only has a dual core 2.33 Ghz, 1Gb 1333Mhz RAM and an oldschoool HDD, your localhost will definitely run faster.
I ran into this kind of problem a few month back when trying to process a few thousand lines of CSVs. My PC was able to complete the task in seconds while using a server to complete the task made my connection to time out.