-
Notifications
You must be signed in to change notification settings - Fork 54
Description
Hi!
I'm trying to figure out why is there a high memory usage peak that lasts for 4 minutes when doing RetrieveMultiple.
There's a LOH memory usage of 400MB (approx) that disappears after 4 minutes. See image 1 (before) and image 2 (after):
I've done a Snapshot to see what's actually going on with the memory usage and I've found out that there are 385MB of Byte[] that is somehow stucked there for those 4 minutes (see image 3 and image 4).
What the program does is using RetrieveMultiple with PagingInfo to retrieve 30.173 records by pages of size 5.000 records. That's why there are 6 Byte[] of size 60MB (approx). So I'm guessing these LOH objects stored there for 4 minutes are the responses from those queries.
I've checked the code around these lines and I haven't seen any Dispose() on the HttpResponseMessage:
PowerPlatform-DataverseServiceClient/src/GeneralTools/DataverseClient/Client/ConnectionService.cs
Line 1964 in dc278e3
| var json = await sResp.Content.ReadAsStringAsync().ConfigureAwait(false); |
Wouldn't it be necessary in order to tell the GC that the memory allocated for it can be released?
Thanks