perf2: 軽量な通知状態APIでプロジェクト画面の再取得を削減 - #449
Draft
PocoPota wants to merge 7 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
プロジェクト画面の初回ロードおよび定期更新で、フォーム・お知らせ・問い合わせの一覧APIが最大3本実行されていたため、画面表示とポーリング時の負荷が大きくなっていた。
このPRでは、未回答フォーム・未確認お知らせ・未読問い合わせコメントの有無を返す軽量な
notification-statusAPI を追加し、プロジェクト画面の初回ロード/60秒ポーリング/focus復帰時の更新を一覧再取得から状態取得に置き換える。
課題
/projectの loader で複数の一覧APIを呼び、通知ドット表示のためだけに重いデータを取得していたrouter.invalidate()を実行しており、配下 loader がまとめて再実行されていた解決策
GET /project/:projectId/notification-statusを追加notification-statusに集約router.invalidate()を廃止project-delivery-targetsに集約し、内部通知同期処理からも再利用実装上の整理
project-delivery-targetsに集約internal-notificationは配信時刻到達後の通知送信、claim、失敗時の再試行制御に責務を絞った仕様上の注意