c# - Minimizing WCF service client memory usage -


i'm implementing wcf service client aimed test several service methods. that's done using standard generated proxy class created add web reference (inherited system.web.services.protocols.soaphttpclientprotocol). need execute type of requests many times simultaneously see how affect server performance (something capacity testing server infrastructure). here's problem - each of responses these requests pretty large (~10-100 mb) , see few calls like

// parameterslist.count = 5 foreach(var param in parameterslist) {     var serviceresponse = servicewebreferenceproxy.executemethod(param);     // serviceresponse not saved anywhere else,     // expected gc'd after iteration } 

causes private bytes of process jump ~500 mb of memory , working set 200-300 mb. suspect running them in parallel , increasing iterations count 100-200 needed cause stackoverflow/outofmemoryexception. how can done then? i'm expecting removal of assigning service method response variable help, that's problem because need see each response's size. i'm looking sort of instant , guaranteed memory cleanup after each iteration.

refactored logic reuse existing objects as possible, gave ability run more clients. after period of time garbage collecting becomes slow performance acceptable.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -