perf(website): the progress feed lists pull requests through the issues API, which runs no git, and only closed items from the last 90 days #2376
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2376
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:perf/progress-feed-issues-api"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The website's progress feed (
website/src/lib/progress-feed.ts) runs on every website build: hourly, on docs pushes,and in pull requests' "Website build and checks". It listed pull requests through Forgejo's
/repos/{repo}/pulls,which runs git for every pull request on a page (diff stats and mergeability). Fork PRs whose branch is gone make
that git call fail, which is the ~40k
GetShortStat ... ambiguous argument ''errors a day. The feed paged it backthrough 90 days of closed PRs, 21+ pages a build. On 2026-11-23, 54 of the forge's 59 slow requests in 3 minutes
were these listings, from the runners on two addresses, while the forge was already short of CPU.
The feed now lists pull requests through
/issues?type=pulls, which runs no git. It takesmerged_atanddraftfromthe issue's
pull_requestfield, so statuses and/pulls/Nlinks don't change. The closed lists of issues and pullrequests pass
since=the start of the 90-day window, and the client still checks the dates. A page asks for 50items, Forgejo's
MAX_RESPONSE_ITEMS; the oldlimit=100was clamped to that anyway. A pull request without apull_requestobject fails the whole collection, so a partial feed is never published.Read first:
website/src/lib/progress-feed.ts,list()and the loop under it.Testing
Tested: checked the request shapes against git.magicbean.dev (Forgejo 17.0.2):
issues?type=pullsreturnspull_request {merged, merged_at, draft, html_url}. Closed-unmerged PRs havemerged_at: null, andWIP:PRs havedraft: true.sort=recentupdateorders byupdated_at.since=with atoISOString()timestamp narrows the result (48 against 1048 for a 5-hour window)./settings/apigivesmax_response_items: 50.website/tests/progress.test.tsis updated: PRs come through the issues endpoint with merged and draft mapped,since=is on the closed lists only, no request goes to/pulls, and a PR withoutpull_requestfails the build.Nothing runs in the game, and nothing was run on this PC. CI's "Website build and checks" passed on the head: it
builds the site, with the feed collected live from the forge through the new requests, and runs these tests.
Still to test: None
Measurements
Verdict: the feed no longer calls
/pulls, so the forge runs no git for the PRs it lists. It used to page about22
/pullspages a build. Wall-clock timings of single pages on the live forge were too noisy to compare: 0.5 to 22 sfor both endpoints while the forge was loaded. The count of slow requests above is the measurement.
d02cac0ff6a32f7c/pullspages per feed buildsince=)Risks
If a later Forgejo dropped
pull_requestfrom issue objects, the collection would fail as a whole and the deployedsnapshot would stay; it would not publish wrong statuses. A revert is enough. Players see nothing different.
Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). (The website's tests, in CI's "Website build and checks", passed. "Guide screenshots" fails onmaintoo, from menu source changes elsewhere: runs 53673, 53679 and 53687.)main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
tests/that reads changed source is updated, not weakened. (website/tests/progress.test.ts.)website/PROGRESS.md.)Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
Possibly related, for context:
WIP: perf(website): the progress feed lists pull requests through the issues API, which runs no git, and only closed items from the last 90 daysto perf(website): the progress feed lists pull requests through the issues API, which runs no git, and only closed items from the last 90 days