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

perf: early return users/notes and users/featured-notes if me is blocked by requesting user #12663

Merged
merged 1 commit into from
Dec 15, 2023

Conversation

anatawa12
Copy link
Member

What

しかしそのようにするのであればそもそもredisに問い合わせる前にblockされてるか確認して[]をearly returnするべきだと思います

#12511 (comment)

を実装します。
ブロックされてる場合にはノートが一切表示されない仕様なためearly returnします

Why

DBにアクセスしなくなって多分パフォーマンスが上がる

Additional info (optional)

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

@github-actions github-actions bot added the packages/backend Server side specific issue/PR label Dec 14, 2023
Copy link

codecov bot commented Dec 14, 2023

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (a2a6a94) 79.66% compared to head (1e22184) 79.64%.

Files Patch % Lines
...d/src/server/api/endpoints/users/featured-notes.ts 0.00% 8 Missing ⚠️
...es/backend/src/server/api/endpoints/users/notes.ts 75.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #12663      +/-   ##
===========================================
- Coverage    79.66%   79.64%   -0.03%     
===========================================
  Files          958      957       -1     
  Lines       108402   108289     -113     
  Branches      8345     8347       +2     
===========================================
- Hits         86362    86244     -118     
- Misses       22040    22045       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Dec 14, 2023

このPRによるapi.jsonの差分

差分はこちら

Get diff files from Workflow Page

@anatawa12 anatawa12 force-pushed the early-return-users-notes branch from 1321561 to 1e22184 Compare December 14, 2023 09:44
@syuilo syuilo merged commit bd4d869 into misskey-dev:develop Dec 15, 2023
18 checks passed
@syuilo
Copy link
Member

syuilo commented Dec 15, 2023

🙏

@anatawa12 anatawa12 deleted the early-return-users-notes branch December 23, 2023 14:59
camilla-ett pushed a commit to kaseiski/misskey that referenced this pull request Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/backend Server side specific issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants