-
-
Notifications
You must be signed in to change notification settings - Fork 498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix distribution filtering by category bug and refactor for performance (#4590) #4806
base: main
Are you sure you want to change the base?
Fix distribution filtering by category bug and refactor for performance (#4590) #4806
Conversation
@cielf This PR changes the way the values are calculated when filtering distributions by items. This change wasn't requested, but I think it makes sense given that's how the total quantities act currently. Let me know if this is unwanted, and I can take that behavior out of this PR. |
@coalest We'd want to take that column change to the business -- we have a Stakeholder Circle next Wednesday. I can definitely see a benefit to it, but they might have reasons to want to keep the other. If it's trivial to split that out into a different PR, please do so -- otherwise, we'll hold off on this PR until next week. |
@cielf That makes sense. I can split it into a different PR. I will move this PR back to draft until I have removed that bit of logic. |
I removed the change regarding the value calculations. Ready for review now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From light testing against prod data, this is noticeably faster (not surprised).
Resolves #4590
Description
Type of change
* New feature (filtering distributions by item category/id now shows the value of those items in the distribution NOT total distribution value)/distributions
page)How Has This Been Tested?
Added request specs
Screenshots
Below is out of date. That behavior will be moved to a new PR if it is desired
Note changes in table header for value and value amounts are now just of those items. (Many items from seeds have no value which is why the number is either very low or blank.)
Because we are no longer loading all the
line_items
anditems
for every distribution into memory, this/distributions
page is now faster. Object allocation dropped significantly and it went from ~480ms to ~170ms in my development environment (seed data + laptop). But not sure what production env/data looks like.Before:
After: