Skip to content
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

feat: CE-1331 List View Performance Tuning #878

Merged
merged 13 commits into from
Jan 20, 2025
Merged

feat: CE-1331 List View Performance Tuning #878

merged 13 commits into from
Jan 20, 2025

Conversation

nayr974
Copy link
Collaborator

@nayr974 nayr974 commented Jan 17, 2025

Description

  • Create a materialized view for cos_geo_org_unit_flat_vw
  • Caches roles from CSS service
  • Updates bulk load script to allow for loading of larger datasets

Fixes #CE-1331 https://env-ceds.atlassian.net/browse/CE-1331

How Has This Been Tested?

  • Loading 1M complaints for performance testing
  • Smoke/regression test of complaints list, map, filters, and detail views

Thanks for the PR!

Deployments, as required, will be available below:

Please create PRs in draft mode. Mark as ready to enable:

After merge, new images are deployed in:

@nayr974 nayr974 changed the base branch from main to release/1.0.1 January 17, 2025 05:26
Copy link
Collaborator

@afwilcox afwilcox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we able to force a cache refresh when someone changes roles on the admin page?

It's a bit weird because if you go in and update a user, but then go in and pull that user again, it looks like your updates haven't taken hold yet. They did eventually (although I'm not sure if I had to leave the application and came back, or if time alone was enough to trigger it)

Comment on lines 41 to 49
CREATE OR REPLACE TRIGGER geo_org_unit_structure_insert_update_refresh_vw
AFTER INSERT OR UPDATE
ON geo_org_unit_structure
EXECUTE FUNCTION cos_geo_org_unit_flat_vw_refresh();



CREATE OR REPLACE TRIGGER geo_organization_unit_code_insert_update_refresh_vw
AFTER INSERT OR UPDATE
ON geo_organization_unit_code
EXECUTE FUNCTION cos_geo_org_unit_flat_vw_refresh();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great. This should cover all the cases.

@nayr974
Copy link
Collaborator Author

nayr974 commented Jan 17, 2025

Are we able to force a cache refresh when someone changes roles on the admin page?

It's a bit weird because if you go in and update a user, but then go in and pull that user again, it looks like your updates haven't taken hold yet. They did eventually (although I'm not sure if I had to leave the application and came back, or if time alone was enough to trigger it)

Oh in the frontend... I was being clever and started a async refresh of the cache on changes but if the frontend is refreshing it right away I'll just clear it instead and they will just have to wait for the remote API to get fresh data

@nayr974 nayr974 closed this Jan 18, 2025
@nayr974 nayr974 reopened this Jan 18, 2025
@nayr974 nayr974 requested a review from afwilcox January 18, 2025 00:46
@afwilcox afwilcox merged commit a742772 into release/1.0.1 Jan 20, 2025
18 checks passed
@afwilcox afwilcox deleted the CE-1331 branch January 20, 2025 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants