Quantcast
Channel: Common Language Runtime Internals and Architecture forum
Viewing all articles
Browse latest Browse all 1710

Memory usage with c# dynamic keyword in Windows Service

$
0
0

we are using dynamic keyword with our custom JSON parsing logic and it seems to be using a lot of memory to cache CallSite calls.

Eventually memory usage grows close to 4GB (server installed memory) and we have to restart our windows service due to alerts in our monitoring service.

Question is - does it CallSite logic clears/reuse cache from time to time, or when approaching memory usage limit, or service will die of memory overflow? what options do we have to control cache policy for CallSite cache?

Most of memory allocated under Microsoft.CSharp.RuntimeBinder.Semantics namespace with .EXPRMEMGRP, .EXPRCALL, .LocalVariableSymbol, .EXPRLIST, .EXPRCLASS having like half a million objects each.

One option we are looking for is to refactor this code but it is a lot of effort and we are looking into some intermediate relief to have more time to refactor it properly.

Thank you, Stan


Viewing all articles
Browse latest Browse all 1710

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>