J.J.,
> For the times you measured, are they logged in IIS log file, or you use
> some
> kind of profiler to get them? Also, are you using XP sp2 too?
To get an off-the-cuff understanding of the code, I created a Console
Application and pasted your code into it with minor changes. I ran the
DevPartner Profiler free community edition to accumulate the statistics I
noted previously. I am running Windows XP SP2 on an 2.8GHz Pentinum 4
machine. Here is part of the profiler output:
Method Name % in Method % with Children Called Average
[Program Start] 0 99.6 0 0
FileReader.Class1.Main 1 25.5 1 3.3
FileReader.Class1.SendWsFileRequestOut 0.8 24.3 1 2.4
System.Security.SecurityManager.ResolvePolicy 0.6 23.7 2 1
FileReader.Class1.GetLocalFile 0.3 23.2 1 0.9
System.Security.SecurityManager.ResolvePolicy 0.9 22.6 2 1.4
System.Reflection.Assembly.CreateSecurityIdentity 0.9 13.8 2 1.5
System.Security.PolicyManager.Resolve 1.8 12.9 2 2.9
System.IO.File.OpenText 0.3 12.8 1 0.9
System.AppDomain.SetupDomain 6.3 12.4 1 19.7
System.IO.StreamReader..ctor 1.2 11.9 1 3.6
System.Security.Policy.Url..ctor 0.1 11.6 2 0.2
System.Security.Util.URLString..ctor 1.6 11.4 2 2.5
System.Security.SecurityManager..cctor 0.1 11.2 1 0.3
System.Security.SecurityManager.Init 0.1 11.1 1 0.4
System.Security.SecurityManager.DoInitSecurity 0.2 11 1 0.7
System.Security.CodeAccessSecurityEngine..ctor 5.5 10.5 1 17.4
System.IO.StreamReader..ctor 0.5 10.1 1 1.5
System.Security.Util.URLString.ParseString 1.5 9.6 2 2.4
System.IO.StreamReader.ReadToEnd 0.5 9.2 1 1.4
System.IO.FileStream..ctor 2.5 9 1 8
System.Security.SecurityManager.InitPolicy 0.1 7.8 2 0.1
System.Security.PolicyManager..ctor 0.7 7.7 1 2.2
System.Security.Policy.PolicyLevel.Resolve 0.3 7.1 6 0.1
System.Security.PolicyManager.InitData 1.4 6.8 1 4.4
System.Security.Policy.PolicyLevel.CheckCache 0.3 6.7 6 0.2
System.IO.StreamReader.Read 0.2 6.1 555 0
System.IO.FileStream..ctor 1 5.9 1 3.3
System.IO.StreamReader.ReadBuffer 0.9 5.9 555 0
> I think your results should be the normal ones. I just don't know why this
> happened on my computer.
Profiling will probably help you understand what is going on.
> Actually I tried to install the Web service on another clean XP sp2
> machine,
> and request files from the same client machine. I still got the same jump
> between 16K and 32K.
Interesting. Sounds like fun figuring it out.
Regards,
Randy
J.J. - 16 Dec 2005 02:36 GMT
Hi Randy,
Seems you were testing it as a console application instead of a Web service?
Also, seems to me the client and the service were on the same machine, right?
Actually when I test on the same machine, I can also get quite normal
result. But, if I test the Web service by initiating requests from another
machine, the results will be the ones I described before.
Also, I am trying DevPartner free community edition. Since an IE window will
be opened for the Web service, what I get are all for the IE session while
not for the Webmethod of the Web service.
Any thoughts?
Thank you and best wishes,
J.J.
> J.J.,
>
[quoted text clipped - 54 lines]
>
> Randy