Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#45 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
php, wordpress

Research direction

Start by tracing resolve_content() through query(), then inspect how WordPress applies the posts_fields filter and the_content filter for WP_Query results. Compare metadata-only cases such as fields = 'ids', REST _fields requests, and admin listings. Done means those queries avoid unnecessary file reads while content is still resolved when the_content or post content is actually needed.

Written by the indexing model from the issue text.

Description

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).

Dominant language
PHP
Stars
5
Forks
1
Avg merge
1h 41m
Merged PRs (30d)
159

Getting set up

We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Automattic/markdown-database-integration

All issues in Automattic/markdown-database-integration

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.