Skip to content

fix: optimize queries for DocumentChangesFeed#5675

Merged
rjsparks merged 1 commit intoietf-tools:mainfrom
rjsparks:optimizedocfeed
May 23, 2023
Merged

fix: optimize queries for DocumentChangesFeed#5675
rjsparks merged 1 commit intoietf-tools:mainfrom
rjsparks:optimizedocfeed

Conversation

@rjsparks
Copy link
Copy Markdown
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
Copy Markdown
Member Author

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

@codecov
Copy link
Copy Markdown

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