Skip to content

Fix event drop by fetching 3 pages with ETag optimization#317

Open
emalaj-seq wants to merge 2 commits into
igrigorik:masterfrom
emalaj-seq:attempt-paging-fix
Open

Fix event drop by fetching 3 pages with ETag optimization#317
emalaj-seq wants to merge 2 commits into
igrigorik:masterfrom
emalaj-seq:attempt-paging-fix

Conversation

@emalaj-seq

Copy link
Copy Markdown

@igrigorik

Fixes #310

The previous commit f1f4200 changed PAGE_LIMIT from 500 to 100 (per GitHub API requirements) but only fetched a single page, causing an ~80% drop in captured events (from ~500 to ~100 per cycle).

This fix:

  • Fetches 5 pages in parallel (up to 500 events, matching original capacity)
  • Adds ETag-based conditional GET requests to minimize API usage
  • Skips polling cycles when page 1 returns 304 Not Modified
  • Automatically scales: only fetches pages that contain data
  • Updates Gemfile to use https:// instead of git:// protocol

Results:

  • Restores original 500 event capture capacity
  • Efficient API usage through ETag optimization
  • No more missed events during normal GitHub activity levels

emalaj-seq and others added 2 commits February 19, 2026 10:38
Fixes igrigorik#310

The previous commit f1f4200 changed PAGE_LIMIT from 500 to 100 (per GitHub
API requirements) but only fetched a single page, causing an ~80% drop in
captured events (from ~500 to ~100 per cycle).

This fix:
- Fetches 5 pages in parallel (up to 500 events, matching original capacity)
- Adds ETag-based conditional GET requests to minimize API usage
- Skips polling cycles when page 1 returns 304 Not Modified
- Automatically scales: only fetches pages that contain data
- Updates Gemfile to use https:// instead of git:// protocol

Results:
- Restores original 500 event capture capacity
- Efficient API usage through ETag optimization
- No more missed events during normal GitHub activity levels

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@emalaj-seq emalaj-seq changed the title Fix event drop by fetching 5 pages with ETag optimization Fix event drop by fetching 3 pages with ETag optimization Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drastic Drop Off in Events After 2025-05-23

1 participant