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

Pre-lookup some data for /report/new/ajax call. #3335

Merged
merged 1 commit into from Mar 5, 2021

Conversation

dracos
Copy link
Member

@dracos dracos commented Mar 2, 2021

The call was doing repeated loops of contacts to look up bodies and
hint texts, repeated database calls to check anonymous allowed, and
making lists of body names it did not need to in templates.

@dracos dracos requested a review from davea March 2, 2021 21:41
@codecov
Copy link

codecov bot commented Mar 2, 2021

Codecov Report

Merging #3335 (2ff0b2d) into master (32b1d20) will increase coverage by 0.02%.
The diff coverage is 95.55%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3335      +/-   ##
==========================================
+ Coverage   82.31%   82.33%   +0.02%     
==========================================
  Files         324      324              
  Lines       21355    21361       +6     
  Branches     3213     3214       +1     
==========================================
+ Hits        17578    17588      +10     
+ Misses       2739     2733       -6     
- Partials     1038     1040       +2     
Impacted Files Coverage Δ
perllib/FixMyStreet/App/Controller/Report/New.pm 91.25% <95.12%> (+0.03%) ⬆️
perllib/FixMyStreet/Cobrand/Default.pm 88.00% <100.00%> (+0.07%) ⬆️
web/cobrands/fixmystreet/assets.js 87.37% <0.00%> (+0.67%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 32b1d20...2ff0b2d. Read the comment docs.

Copy link
Member

@davea davea left a comment

Choose a reason for hiding this comment

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

Worth a mention in CHANGELOG, I reckon. 👍

The call was doing repeated loops of contacts to look up bodies and
hint texts, repeated database calls to check anonymous allowed, and
making lists of body names it did not need to in templates.
@dracos dracos merged commit 2ff0b2d into master Mar 5, 2021
@github-pages github-pages bot temporarily deployed to github-pages March 5, 2021 17:18 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.

None yet

2 participants