After work yesterday, my colleague que told me that he deleted some useless web methods in the WebService class. As a result, he found that we used nearly 20 MB (20 mb) for program running on the client) memory. Ah ~ Yes! How can I ignore this important factor all the time ?! As the project progresses, our WebService continues to grow. A considerable number of webmethods are legacy and accumulated in previous versions, even though they are no longer used, however, due to concerns that deleting these methods will affect other modules, they are retained. Because the WebService proxy classes on the client also correspond to the proxy methods of all webmethods, this directly leads to the volume of WebService proxy classes on the client, A large WebService proxy instance occupies a large amount of memory.
Based on this problem, we recommend that you plan the WebService class according to the system logic during the design, instead of placing all the operation methods in a WebService class; create related WebService classes only during use. We recommend that you create as late as possible and release it as early as possible.
Writing faster managed code: Understanding overhead
Http://www.microsoft.com/china/MSDN/library/archives/library/dndotnet/html/fastmanagedcode.asp
Introduction to designer
Http://www.microsoft.com/china/MSDN/library/enterprisedevelopment/softwaredev/SDaskgui08202002.mspx