Merged
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.
概要
フォトアルバムプラグインの「もっと見る」処理について、index 初回表示と追加表示の並び順を統一し、DB活用による取得負荷の改善を行いました。
背景や目的
従来の
moreContentsは毎回全件取得後に PHP 側でソート・slice していたため、データ件数増加時の負荷が高くなっていました。並び順の仕様(name/created/manual)を維持したまま、index と moreContents の一貫性を保って性能を改善することが目的です。
変更内容
moreContentsのtarget不正時 400、存在しない/非表示配下時 404 の応答を維持しました。photoalbum_id条件を追加しました。photoalbum_contentsに複合インデックスを追加しました。photoalbum_id, parent_id, is_folder特記事項
photoalbum_contentsのカバー取得向けに追加を試したphotoalbum_id, is_cover, parent_idインデックスは、効果確認のうえ追加しませんでした。レビュー完了希望日
関連Pull requests/Issues
なし
参考
なし
DB変更の有無
有り
チェックリスト