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

Be more intelligent about caching the number of benefits records #65

Open
hancush opened this issue Nov 19, 2019 · 1 comment
Open

Be more intelligent about caching the number of benefits records #65

hancush opened this issue Nov 19, 2019 · 1 comment

Comments

@hancush
Copy link
Member

hancush commented Nov 19, 2019

In its original implementation, the search view performed a count of the entire benefits table every time a search was issued. This was a real drag on performance. The total number of benefit records is now hard-coded into the search view to eliminate the duplicate query.

# TODO: Cache this, rather than hardcoding
total_records = 3713872

We should be smarter about this. Perform and cache the count when data is imported, and retrieve the cached value in the view.

@hancush
Copy link
Member Author

hancush commented Dec 17, 2019

Here's how to remove the total records text, via @beamalsky: https://github.com/datamade/committee-oversight/pull/137/files#diff-3965f1be15bd00793039b4e8259d444dR46-R48

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

No branches or pull requests

1 participant