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.
#51 に関するPRです。
[Download All]
チェック時のCSVダウンロード処理に対して、使用メモリを減らすように変更しています。
get_posts()
によるデータの一括取得を、分割して取得するように変更。MW_WP_Form_Chart_Controller::get_paged()
は常に設定値またはデフォルト値を返すように変更。max_execution_time
対策を追加。分割時の取得件数は、1ページの表示件数を引き継いで使用するようにしています。
別途設定を設けた方がベストだと思いますが、手抜きしちゃいました><
CSVのヘッダー出力の仕様ですが、
出力範囲内の問い合わせデータに基づいて、カラムを取得するように変更しました。
また1ページ目のみの出力、2ページ目のみの出力でカラムが異なる可能性がありますが、
こちらは旧来の挙動を引き継いでおります。
以下廃案。
1ページ目で取得可能なカラムのみを出力し、2ページ目以降に出現するカラムは名無しのカラムとして扱うよう実装しています。
一度総なめして正確に取得するかどうか悩みました…
とりあえず実行速度を優先にしています。
このあたりよろしければご判断をお願いできましたら幸いです。
問い合わせデータCSV出力結果