Skip to content

Reduce Heartbeat polling cost on cheap hosting #267

Description

@josephfusco

Presence polling pays a full query (and, if riding Heartbeat, part of the WP bootstrap) on every tick, even though most ticks in a quiet room find nothing changed. On cheap shared hosting (few PHP-FPM workers, no guaranteed object cache), that cost matters more than on managed hosting, and it compounds if other features end up polling on a separate schedule instead of sharing this one.

Three independent techniques, tracked as sub-issues below. Each needs its own before/after measurement (ties to #132) rather than shipping on intuition, since they're not equally impactful.

  • Skip the response body when presence state hasn't changed
  • Coalesce polling across tabs of the same user
  • Back off polling interval for idle rooms

Tracking issue only — no code here.

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Sonnet 5
Used for: Assisting with investigation and drafting

Metadata

Metadata

Assignees

Labels

PerformanceWork relates to query load, cache behavior, or scaling[Type] EnhancementA suggestion for improvement of an existing feature

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions