You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "Michael Vorburger (Jira)" <ji...@apache.org> on 2022/02/05 19:20:00 UTC

[jira] [Commented] (FINERACT-1496) Improve performance for loading a Loan

    [ https://issues.apache.org/jira/browse/FINERACT-1496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17487541#comment-17487541 ] 

Michael Vorburger commented on FINERACT-1496:
---------------------------------------------

[~arnoldgalovics] I've just granted you the "Contributor" role on this JIRA, so you can now e.g. Assign issues to yourself.

Please also set the Fix Version appropriately (e.g. 1.6.0 for this one, for the current one); this helps with Release Notes.

Welcome to Apache Fineract!

> 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.6.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)