2

I'm new in asp.net mvc4 and need some advices.

At my project some images are stored and load from SQL 2008 server. Everything is ok and they loads fast from there till user authorizes. After it images become load twice slower.

Why does this appear? I use only one database (shared hosting restrictions) and one user connects to it. I have two connections to DB. First for entity framewors and other for simple authorization. Maybe this is a problem?

   connectionStrings
add name="AuthorizationConnection" providerName="System.Data.SqlClient" connectionString="data source=**********;initial catalog=*****;persist security info=True;user id=SQLUser;password=*********;" /
add name="AMKEntities" connectionString="metadata=res://*/Models.AMKDBEntities.csdl|res://*/Models.AMKDBEntities.ssdl|res://*/Models.AMKDBEntities.msl;provider=System.Data.SqlClient;provider connection string="data source=**********;initial catalog=*****;persist security info=True;user id=SQLUser;password=**********;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" /
/connectionStrings

Also from all images what are being loaded only 4-6 images from about 30 loads with delay (all images are category images with the same dimensions about 10Kb). But these 4-6 images from 30 seems selected randomly. Each page refresh only 20% loads slow. Other loads immediately.

2
  • Which edition of Visual Studio are you using? The higher editions have a build in profiler Commented Dec 9, 2012 at 18:02
  • Thanks for responce. I use Visual Studio 2012 Commented Dec 9, 2012 at 18:18

1 Answer 1

3

Try Miniprofiler, it's easy to use and this is what Stackoverflow uses to profile their site.

Here is the link:

http://miniprofiler.com/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.