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

Reduce some DB queries #4548

Merged
merged 2 commits into from
Aug 3, 2023
Merged

Reduce some DB queries #4548

merged 2 commits into from
Aug 3, 2023

Conversation

dracos
Copy link
Member

@dracos dracos commented Aug 2, 2023

Worst thing was shortlist report sorting was doing a DB query each call of the sort function (eek).

@codecov
Copy link

codecov bot commented Aug 2, 2023

Codecov Report

Merging #4548 (f89ccdb) into master (1e11468) will decrease coverage by 12.82%.
The diff coverage is n/a.

❗ Current head f89ccdb differs from pull request most recent head 5d0b22b. Consider uploading reports for the commit 5d0b22b to get more accurate results

@@             Coverage Diff             @@
##           master    #4548       +/-   ##
===========================================
- Coverage   82.29%   69.48%   -12.82%     
===========================================
  Files         371       40      -331     
  Lines       28091     4886    -23205     
  Branches     4383        0     -4383     
===========================================
- Hits        23118     3395    -19723     
+ Misses       3658     1491     -2167     
+ Partials     1315        0     -1315     

see 332 files with indirect coverage changes

@dracos dracos force-pushed the planned-reduce-db-queries branch from 4f3c724 to 5d0b22b Compare August 2, 2023 19:44
dracos added 2 commits August 3, 2023 12:20
Store the user_planned_report IDs to use when sorting, and no
need to show the shortlisted user on your own shortlist page.
Previously, `translated` would return undef for any Body/Contact row
without a translation - this meant any code using this would try and
translate any row without a match again one-by-one, even though this
check had already been done. By including the fallback column in the
translation lookup, it can be returned immediately.
@dracos dracos force-pushed the planned-reduce-db-queries branch from 5d0b22b to 788062c Compare August 3, 2023 11:20
@dracos dracos merged commit 788062c into master Aug 3, 2023
@dracos dracos temporarily deployed to github-pages August 3, 2023 11:21 — with GitHub Pages Inactive
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.

1 participant