Fleshing org unit on standing penalties should omit org unit children

Bug #1959461 reported by Jeff Godin
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Undecided
Unassigned
3.7
Fix Released
Undecided
Unassigned

Bug Description

Affects at least Evergreen 3.8 -- or may be most noticeable there.

When loading a user, the AngularJS patron service performs "local" fleshing of the patron object, including fleshing the org unit on standing penalties.

When a standing penalty's org unit has child org units, this can result in a large number of org units being attached to the patron object, which are then sent to the server if you edit the patron.

This can be particularly problematic when adding a patron message with Depth set to "Everywhere".

Your patron object ends up with a full copy of the org tree for each such message.

Tags: performance
Jeff Godin (jgodin)
Changed in evergreen:
assignee: nobody → Jeff Godin (jgodin)
Revision history for this message
Jeff Godin (jgodin) wrote :

I think the fleshing of org unit on standing penalties is so that we have at least the org unit name/shortcode when displaying the penalties later in the client.

It seems unlikely that we need the children of the org unit, if any.

In addition to not fleshing a large number of aou objects on each standing penalty, we might not even need to send the standing_penalties field contents to the server when saving the patron.

For now, an approach to clone and set children of the fleshed org unit to an empty array seems to help address the issue.

see working branch user/jeff/lp1959461_avoid_fleshing_org_unit_children

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/jeff/lp1959461_avoid_fleshing_org_unit_children

Changed in evergreen:
status: New → Confirmed
tags: added: performance
Revision history for this message
Chris Sharp (chrissharp123) wrote :

Pushed to master, rel_3_7, and rel_3_8. Thanks for your work on this, Jeff!

Changed in evergreen:
status: Confirmed → Fix Committed
assignee: Jeff Godin (jgodin) → nobody
Revision history for this message
Andrea Neiman (aneiman) wrote :

updating LP to reflect that this went into rel_3_7

Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.