summaryrefslogtreecommitdiffstats
path: root/cps-application/src/main/java/org
diff options
context:
space:
mode:
authordanielhanrahan <daniel.hanrahan@est.tech>2023-06-08 14:37:17 +0100
committerdanielhanrahan <daniel.hanrahan@est.tech>2023-06-14 14:29:06 +0100
commit9474e8f257f9a03c80c01cbf3729cd128a43847b (patch)
tree30c9f019e3e7df44d37ae8e4ffb695426b01ac2b /cps-application/src/main/java/org
parent1368fd006373dd209a34274723fbda6ecb9d317f (diff)
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 <daniel.hanrahan@est.tech> Change-Id: Ic47a2c9eb34150ed76bd5ce452fe1c9aaf9b4c5c
Diffstat (limited to 'cps-application/src/main/java/org')
0 files changed, 0 insertions, 0 deletions