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

fix: optimize queries for DocumentChangesFeed #5675

Merged
merged 1 commit into from
May 23, 2023

Conversation

rjsparks
Copy link
Member

@rjsparks rjsparks commented May 22, 2023

Anecdote:

For /feed/document-changes/draft-ietf-roll-useofrplinfo, this cuts the number of queries from 1037 to 7, and reduces the overall time it takes to render the view to 31% of the current code in main.

Several other places pass a list instead of a queryset into augment_events_with_revision. If they can be modified to pass a queryset, they'll see a similar performance increase.

@rjsparks
Copy link
Member Author

I pursued this optimization based on the traces Scout collected - this endpoint is very heavily utilized.

@codecov
Copy link

codecov bot commented May 22, 2023

Codecov Report

Merging #5675 (4c2bc47) into main (f932239) will decrease coverage by 0.43%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##             main    #5675      +/-   ##
==========================================
- Coverage   89.15%   88.73%   -0.43%     
==========================================
  Files         287      285       -2     
  Lines       41207    39845    -1362     
==========================================
- Hits        36739    35357    -1382     
- Misses       4468     4488      +20     
Impacted Files Coverage Δ
ietf/doc/utils.py 87.13% <62.50%> (-0.17%) ⬇️
ietf/doc/feeds.py 75.63% <100.00%> (ø)

... and 25 files with indirect coverage changes

@rjsparks rjsparks merged commit 6178519 into ietf-tools:main May 23, 2023
@rjsparks rjsparks deleted the optimizedocfeed branch May 23, 2023 15:14
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants