From 9474e8f257f9a03c80c01cbf3729cd128a43847b Mon Sep 17 00:00:00 2001 From: danielhanrahan Date: Thu, 8 Jun 2023 14:37:17 +0100 Subject: Lower memory usage in FragmentRepository Avoid using Spring Data "interface projection" in FragmentRepository. The use of FragmentExtract in FragmentRepository is causing an overhead of around 5 kilobytes per fragment, which is leading to abnormally high memory usage when queries return a large number of nodes. For example, around 250MB of additional memory is needlessly used when fetching 50,000 datanodes. - Remove FragmentExtract interface and FragmentEntityArranger class. - Add FragmentPrefetchRepository, using JdbcTemplate and RowMapper to fetch FragmentEntity descendants in a single SQL query. - Many CpsDataService operations have memory reductions: - queryDataNodes - getDataNodesForMultipleXpaths - updateDataNodesAndDescendants - updateNodeLeaves - and any NCMP methods using the above. Issue-ID: CPS-1716 Signed-off-by: danielhanrahan Change-Id: Ic47a2c9eb34150ed76bd5ce452fe1c9aaf9b4c5c --- cps-ri/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cps-ri/pom.xml') diff --git a/cps-ri/pom.xml b/cps-ri/pom.xml index 66b89de926..504fce560b 100644 --- a/cps-ri/pom.xml +++ b/cps-ri/pom.xml @@ -33,7 +33,7 @@ cps-ri - 0.34 + 0.32 -- cgit 1.2.3-korg