Possible Duplicate:
What is considered fast performance for a single server request?
I’m building a web app and I put a stopwatch in my code behind of a webservice that I anticipate to be heavily used. It basically receives a json record and updates the database. When there are only 2 tables to update/write, the stopwatch read 49ms and when there are 6 tables involved, it runs around 150ms.
[WebMethod(EnableSession = true)]
public string UpdateLead(string Incoming)
{
Stopwatch sw = new Stopwatch();
sw.Start();
...code here
sw.Stop();
return ReturnData;
}
I know this is is running on my local machine and that it’s really just a very limited perspective but I wanted to know if, based on these figures and the given context, the values seem acceptable as they are for now.
Thanks for your input.
@frenchie , It is very hard to say . few thing for you to know :
1) the stopwatch values will be different in other enviroment ( production) or maybe if your computer is over-Thinking – which cause him to dumjp some memory to the Swap File (virtual mempoy).
also ,
if GC is in the middle – your values also will be different.
2) please consider caching (data/ output)
3) try to avoid locks ( which has performance penalties).
4) dont put code in try catch – raising an exception is extremely expensive.