Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Smart resolution skipping — skip file reads for metadata-only queries

オープン
#45 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
php, wordpress

調査の方向性

まず resolve_content() を query() を通じて追跡し、次に WordPress が WP_Query の結果に対して posts_fields フィルターと the_content フィルターをどのように適用するかを確認します。fields = 'ids'、REST _fields リクエスト、管理画面の一覧など、メタデータのみを取得するケースを比較します。完了の条件は、それらのクエリで不要なファイル読み込みを避けつつ、the_content または投稿のコンテンツが実際に必要な場合にはコンテンツが引き続き解決されることです。

索引モデルが issue の本文から書いたものです。

説明

enhancement

Problem

Currently, resolve_content() fires for every SELECT on wp_posts that includes post_content (which is most queries, since WordPress uses SELECT *). This means even admin list tables and count queries trigger file reads, even though they don't display content.

Proposed solution

Phase 4 of the Index/Map Architecture:

  1. Detect metadata-only queries: queries where content is selected but never used (admin list tables, REST collection endpoints with _fields, WP_Query with fields => 'ids')
  2. Use the posts_fields filter: WordPress fires this filter on WP_Query — we can detect when content is excluded
  3. Lazy-lazy resolution: instead of resolving content in query(), resolve it in the_content filter or when $post->post_content is first accessed

Impact

Low priority — file reads are ~0.1ms each. For a listing page with 20 posts, that's 2ms total. But for admin pages with 100+ posts, it adds up.

Context

Phase 4 of the Index/Map Architecture (PR #41).

主要言語
PHP
スター
5
フォーク
1
平均マージ
1時間 41分
マージ済み PR(30日)
159

環境構築

このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Automattic/markdown-database-integration のほかの issue

Automattic/markdown-database-integration の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。