Service Efficiency

I hope you could help me.

I use WCF in my program. Part of this involves using ServiceHost in a self-service type script using netNamedTypeBinding. When I include ServiceHost in my class and then create an instance of this class (at the moment, ServiceHost is set to null), memory usage increases by about 9 MB. If I comment on the ServiceHost attribute, the memory does not jump.

This is a pretty old piece of memory used by ServiceHost. Is there anyway to shorten this or is there a version of ServiceHost that is more compact? To ask for despair is really the way I need so that my program has the most efficient memory.

Thanks so much for your time.

+3
source share
1 answer

Direct answer: No, probably not. You pick up a large library, and you just have to pay the price.

But a couple of points:

  • on any platform that can run WCF in general, 9MB should not be much.
  • Measuring memory usage in a modern OS is complex. What memory value (there are many) do you use for this?
+1
source

Source: https://habr.com/ru/post/1759915/


All Articles