I've been following performance of my website and out of all slow-executing code (>1s), more than 90% is because of System.Web.HttpRequest.GetEntireRawContent() (called by System.Web.HttpRequest.FillInFormCollection())
Is this normal for ASP.NET sites... to sometimes spend more than 10 seconds in FillInFormCollection method (obviously it's called from System.Web.UI.Page.PerformPreInit())?
Or there is a way to fix this problem?
I'm compiling for .NET Framework 3.5.
Page I'm mostly having trouble is Login page, although there is nothing unusual about it - two TextBoxes, Checkbox for RememberLogin and Login button. Request.ContentLength is around 5KB (I've logged Request.Form.ToString() - found nothing unusual). I've performed lots of tracing (were expecting huge POSTs) and debugging but couldn't find any rational reason for FillInFormCollection to take more than 10 seconds (I once had extreme example with 250 seconds). I've even tried slowing down my connection with Fiddler, but couldn't reproduce the problem.
EDIT: Thanks for all the comments guys. I've continued pursuing this issue... if it gets solved at least it'll save other people quite some time ;). Here are answers to some of the questions.
Here is what I found to be the problem, or should I say cause, of my application showing poor performance on the method: System.Web.HttpRequest.FillInFormCollection()
It seems the System.Web.HttpRequest.FillInFormCollection()
starts as soon as it gets the beginning of the data being submitted to the form and completes once the last bit of data has been received. If my user has a poor connection it can take a long time for this information to be completely submitted. Hence the long times for this method.
I used a bandwidth limiter on my local machine and was able to reproduce consistent results that were in line with the varying speeds I tested at, the slower the connection speed the longer the System.Web.HttpRequest.FillInFormCollection()
took to run.
Unless you are getting complaints that your web site is not working you are probably just looking at code run by users with crappy connections.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With