Improve UI performance via more effective entity bean model caching
Description
Environment
is related to
Activity

Robin Fronk March 2, 2021 at 8:45 PM
Note: Some of the views still have the capability to log the load time. The instance needs to be in Development mode and debug logging turned on for org.ssdt_ohio.usas.vui.utils.PerformanceLoggingUtils. Some of the logging used in this issue has been removed, mainly where views set final variables in the constructor. Time constraints prevented assessing and refactoring the view constructors.

Robin Fronk March 2, 2021 at 6:11 PM
Testing Notes: Due to issues with the application context not being consistently available, the bean model cache may not be created on startup which makes the changes in this issue difficult to test. The only thing that I can think to test is that the bean model cache is created at some point.

Robin Fronk March 2, 2021 at 2:22 PMEdited
Benchmarking Results, time expressed in seconds. It's clear caching the bean model has a positive effect, although the results varied. It became clear that the accounts, Project, and Refunds need further assessment as the load times are still high.
District 1
View Name | Pre-Cache | Post-Cache Init |
Fund | 3.218 | 1.141 |
CashAccount | 10.3035 | 8.86 |
Appropriation | 10.6 | 10.265 |
Expenditure | 4.185 | 1.967 |
Revenue | 6.219 | 3.806 |
Project | 11.24 | 9.89 |
PurchaseOrder | 1.679 | 0.724 |
Invoice | 4.03 | 1.726 |
Payable | 1.411 | 0.661 |
Payable Detail | 8.631 | 1.672 |
Disbursement | 1.196 | 0.972 |
Distribution | 0.492 | 0.365 |
Receipt | 0.924 | 0.692 |
Refund | 27.908 | 26.412 |
Pending Transaction | 2.137 | 1.958 |
Requisition | 0.199 | 0.169 |
Transfers/Advances | 1.013 | 0.915 |
Activity Ledger | 2.991 | 3.018 |
Account Filter | 0.451 | 0.332 |
Cash Reconciliation | 0.438 | 0.284 |
Vendor | 0.865 | 0.799 |
District 2
View Name | Pre-Cache | Post-Cache Init |
Fund | 2.296 | 1.805 |
CashAccount | 11.947 | 9.309 |
Appropriation | 7.822 | 5.6 |
Expenditure | 4.024 | 1.728 |
Revenue | 5.878 | 3.387 |
Project | 1.375 | 0.975 |
PurchaseOrder | 1.633 | 0.583 |
Invoice | 4.101 | 0.929 |
Payable | 1.0975 | 0.446 |
Payable Detail | 7.798 | 1.303 |
Disbursement | 1.482 | 1.053 |
Distribution | 0.468 | 0.288 |
Receipt | 0.822 | 0.635 |
Refund | 13.126 | 8.757 |
Pending Transaction | 1.723 | 1.235 |
Requisition | 0.475 | 0.358 |
Transfers/Advances | 0.963 | 0.699 |
Activity Ledger | 2.127 | 1.537 |
Account Filter | 0.411 | 0.306 |
Cash Reconciliation | 0.422 | 0.249 |
Vendor | 0.697 | 0.694 |
Details
Assignee
Robin FronkRobin FronkReporter
Jodi BecherJodi BecherStory Points
2Fix versions
Time tracking
2d 4h logged2h remainingComponents
Sprint
NonePriority
Major
Details
Details
Assignee

Reporter

We need to implement the improvements made to the caching of the entity bean model at startup.
To Do
Update collaborator to include a no argument constructor when one does not exist.
Add VUIPerformanceHint annotation to Views when needed adding list of 'entitiesUsed'
to determine this turn on logging for the VUIBeanModel and review logging to see which objects must be retrieved via the cached method. Will also want to add logging to EntityInfoFactoryImpl and monitor get() for uncached entities.
Add CollaboratorModelCache annotation to Views and provide the collaborator
List of Views to update
Fund
Cash
Appropriation
Expenditure
Revenue
Projects
Purchase Order
AP Invoice
Payable
Disbursement
Distribution/Error Correction
Receipt
Refund
Pending Transaction
Requisition
Transfers/Advances
Activity Ledger
Account Filter
Cash Reconciliation
Vendors - Attempting to initialize the cache without a user is counter-productive...the cache will not be used.
Benchmark the loading of each view so that we can report the performance improvement.