[
https://issues.apache.org/jira/browse/FINERACT-1496?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Arnold Galovics resolved FINERACT-1496.
---------------------------------------
Resolution: Fixed
> Improve performance for loading a Loan
> --------------------------------------
>
> Key: FINERACT-1496
> URL: https://issues.apache.org/jira/browse/FINERACT-1496
> Project: Apache Fineract
> Issue Type: Improvement
> Reporter: Arnold Galovics
> Assignee: Arnold Galovics
> Priority: Major
> Fix For: 1.7.0
>
>
> With the current implementation and the configured JPA associations, when
> loading a single Loan entity from the database through JPA, it'll eagerly
> fetch all the related LoanCollateralManagement entities.
> Generally speaking we should aim to avoid EAGER loading to prevent
> performance bottlenecks to form and we should only use it in places where
> it's really justified.
>
> Unfortunately by marking this Loan -> LoanCollateralManagement relationship
> eagerly fetched it starts kind of a chain reaction of loading a lot more data
> than needed.
> The whole relationship chain looks the following:
> Loan -> LoanCollateralManagement -> ClientCollateralManagement ->
> CollateralManagementDomain -> ApplicationCurrency
> That's a huge slice of data.
>
> The idea of this ticket is to adjust this behavior and switch the Loan ->
> LoanCollateralManagement relationship to be a LAZY relationship so different
> use cases have the chance to fetch only the data they'll need.
> This will definitely speed up the Loan related operations.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)