In OpenEdge 11.6 and 11.7, there is a memory leak issue with Progress Clients (_progres, _proapsv, prowin) when using JSON objects
The underlying built-in classes inefficiently store JSON objects in memory:
- The memory usage is unrelated to the HTTP client code, but instead is the cost of creating the JSON object.
- For each node in the JSON object, we are creating a new storage pool is created with the intention of being able to contain all the details of that node in the one place, which can be disposed together.
- The minimum size of the pool is 8KB, no matter how small the amount of memory is needed.
- Since the memory usage of the JSON node is small, most of this 8 KB memory space is not used which means a JSON object can consume considerably more memory than the JSON text.
- For example: A minimal node for a JSON object that contains only other JSON objects is around 224 bytes, which means that more than 7KB was allocated but never used.
- JSON objects do not share a common storage pool for the JSON "document". Each individual JSON object within the larger JSON object uses 8KB, which quickly consumes memory.