...
Regarding CPS-core, there is a more fundamental problem in that CPS path queries could return any amount of data - it will be unknown to the application until a query is executed (even if pagination on DataNodes were used, since CPS DataNodes represent tree-structures, it is not known how deep the tree is). Further analysis is needed here, however simple mitigations will be recommended (e.g. extending public APIs to allow limiting maximum results)Some solutions will be proposed for CPS path queries to reduce memory use.
This study and implementation proposal will target simple and concrete steps to reduce memory consumption.
...
NCMP CM Handle Queries are directly implicated in CPS-2146, as the Out Of Memory errors occurs during NCMP Search and ID Search functions.
See CPS-2146 CPS Core Using Java Streams APIto reduce memory consumption in CPS and NCMP for solution to reduce memory consumption during these operations.
...