C # - Can WebMethodAttribute adversely affect performance?

I just noticed that my Excel service is much faster. I am not sure that the state of the environment is occurring. I made changes to the method. Where used to be

class WebServices{
[ WebMethod( /*...*/) ]
public string Method(){}
}

Now its attribute is removed, and the method moves to another class

class NotWebService {
public string Method(){}
}

But I did this because the method is not called or used as a service. Instead, he was called through

WebServices service = new WebServices();
service.Method();

and inside the same assembly. Now when i call the method

NotWebService notService = new NotWebService();
notService.Method();

Response time seems to have increased. Does the WebMethodAttribute property have the ability to slow down local calls?

+5
source share
2 answers

, WebMethod , XML WebService.

, , , -:

  • BufferResponse
  • CacheDuration

WebMethod

,

+2

, , , , .

wacdany.

, -, , , HTTP. , , .

, , . WebMethodAttibute , .

, - webservice. , , , .

, , , , -. , , WebServices, - - -, , - - .

0

All Articles