|
as a part of work going into mifosx-735, we now fetch the running balance for every Ledger account as a part of the glaccounts API.
The co-related sub query used for the same is bound to cause performance issues (does a group by of all accounts, a medium size organization would have around 250+ accounts.......). Unless we figure out a way to optimize the same, we would not want to invoke the same while not required
For Ex:
The service methods for fetching glaccounts are used in various other places (listing account options for loans, savings, possible accounts for journal entries, advanced accounting setup etc) do not need the running balance (would be cached later and should not take the hit for calculating running balances)
Would prefer to re-factor the changes to retrieveAllGLAccounts made in https://github.com/openMF/mifosx/commit/3f70867fe85255858f9b8eaa213b91eecc45fa82 to only be used by a GET api with an optional query param glaccounts?fetchRunningBalance=true (would default to false)
The reset of the code should use the earlier retrieveAllGLAccounts method....
|