Cache settings more aggressively in web client
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Workstation settings are now stored on the server (bug 1750894), which is great. However, the client is now doing an awful lot of calls to the server to lookup workstation/
For example, yesterday our 3.3.4 environment saw about 200,000 calls to either open-ils.
lib.timezone: 24,412
ui.staff.
ui.staff.
webstaff.
webstaff.
circ.staff_
circ.clear_
ui.staff.
ui.admin.
ui.admin.
format.date: 11,136
eg.audio.disable: 10,425
Most of these (timezone, date formats, eg.audio.disable) rarely change and could be looked up once at the start of the session and then cached. Others are more likely to be changed by staff during a session, but we could trigger a cache update when the user changes the value.
tags: | added: needsreleasenote |
Changed in evergreen: | |
assignee: | nobody → Bill Erickson (berick) |
Changed in evergreen: | |
assignee: | nobody → Bill Erickson (berick) |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
The largest numbers of lookups are attributable to just a few spots in the AngularJS client:
- The top 5 settings are almost always looked up together during egStartup.
- The next 5 settings are mainly looked up together immediately after startup for egCirc.
- format.date is looked up anew for every egDateInput.
From what I'm seeing in our logs, we could eliminate up to 45% of open-ils. actor.ou_ setting. ancestor_ default. batch calls by using cached values for those 11 specific settings in these three places.