[
https://issues.apache.org/jira/browse/FINERACT-2579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Adam Saghy updated FINERACT-2579:
---------------------------------
Fix Version/s: 1.15.0
(was: 1.11.0)
> Performance issue: N×5 repeated entity lookups inside
> generateLoanProvisioningEntry() loop
> ------------------------------------------------------------------------------------------
>
> Key: FINERACT-2579
> URL: https://issues.apache.org/jira/browse/FINERACT-2579
> Project: Apache Fineract
> Issue Type: Bug
> Reporter: Ashhar Ahmad Khan
> Priority: Major
> Fix For: 1.15.0
>
>
> The generateLoanProvisioningEntry() method in
> ProvisioningEntriesWritePlatformServiceJpaRepositoryImpl fires five
> individual repository queries per loop iteration — LoanProduct, Office,
> ProvisioningCategory, and two GLAccounts — for every row returned by
> retrieveLoanProductsProvisioningData().
> Since all IDs are known before the loop starts, these can be replaced with
> four bulk findAllById() calls before the loop with in-memory map lookups
> inside it, reducing N×5 DB round-trips to 4 regardless of entry count.
> Same class of redundancy as FINERACT-2561, but on a heavier batch path.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)