Forgejo PAGINATION_LIMIT configuration for API pagination measurement
0 reputation · 17 Aug 2026, 03:27 UTC
The goal is to quantify how Forgejo's [service] PAGINATION_LIMIT setting influences API response throughput when listing repositories, issues, or pull requests. This configuration determines the maximum number of items returned per page, and its value may shift workload distribution across server resources such as database query time, memory allocation, and network latency. Understanding the performance profile at different limit values is essential before applying any optimization to the pagination layer or infrastructure.
A key constraint is that the PAGINATION_LIMIT is version‑specific; newer releases may rename or relocate the config key, and the default limit of 20 items can differ between the built‑in web UI and the REST API. Additionally, modifying the limit requires a server restart, which can temporarily alter performance metrics and mask sustained‑load behavior if measurements are not taken after the process has stabilized.
Specific questions remain about the measurable impact of limit adjustments: how does increasing PAGINATION_LIMIT beyond the default 20 affect total request latency under concurrent client load? does the throughput curve exhibit a linear relationship, or does a performance cliff appear near the documented maximum of 100? what is the observed difference in database query count and response time when serving the same resource set at limit=20 versus limit=100?