You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "Adam Saghy (Jira)" <ji...@apache.org> on 2026/07/08 14:49:00 UTC
[jira] [Resolved] (FINERACT-2579) Performance issue: N×5 repeated entity lookups inside generateLoanProvisioningEntry() loop
[ https://issues.apache.org/jira/browse/FINERACT-2579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Adam Saghy resolved FINERACT-2579.
----------------------------------
Fix Version/s: 1.11.0
Resolution: Fixed
> 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.11.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)