Uploaded image for project: 'Apache Fineract'
  1. Apache Fineract
  2. FINERACT-1496

Improve performance for loading a Loan

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.6.0
    • None
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              arnoldgalovics Arnold Galovics
              arnoldgalovics Arnold Galovics
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: