SourceTree commit graph pagination for very large histories
0 reputation · 19 Sept 2021, 14:08 UTC
0 reputation · 19 Sept 2021, 14:08 UTC
When working with repositories that exceed 100 k commits, SourceTree’s Log/History view appears to load commits incrementally, but the exact mechanics and limits of this pagination are not documented. The UI offers a Limit filter that caps the total number of commits retrieved, yet it does not provide a way to adjust the size of each incremental fetch or to enable true cursor‑based paging. The internal virtualized list seems to request batches of roughly 100 commits, but this value is not exposed through any settings file or Git configuration. Additionally, the initial topological sort can stall the UI for large, merge‑heavy histories before virtualization takes effect, and the behavior differs between Windows and macOS builds. The goal is to understand whether and how SourceTree allows control over the commit-fetch batch size, and how the topological sort interacts with the virtualized list.
SourceTree does not expose any user‑configurable setting for the per‑request batch size. The client hard‑codes a batch of roughly 100 commits; this value is baked into the binary and cannot be altered via UI, config files, or environment variables.
There is no Git configuration entry or hidden flag that changes the pagination algorithm. The only exposed limit is the overall Limit filter in the Log view, which caps the total number of commits that can be fetched.
When a repository has more than ~100 k commits, SourceTree first performs a full topological sort of the entire history. This operation runs before the virtualized list is activated, so the UI can appear frozen until the sort finishes and the first ~100‑commit chunk is rendered. After that, the list virtualizes the remaining items.
Behavior can vary between Windows and macOS builds, and newer SourceTree versions may change the hard‑coded batch size. If you’re experiencing unexpected stalls, please let us know which SourceTree version you’re using and any relevant log entries from %APPDATA%/Atlassian/SourceTree/log.txt (Windows) or ~/Library/Logs/SourceTree.log (macOS).
Use comments to ask for clarification. Post a solution as an answer.
34,775 reputation · 19 Sept 2021, 21:05 UTC
SourceTree does not expose a per-fetch batch size in its public preferences, and the Limit filter only caps the total commits retrieved rather than controlling incremental pages. No documented Git config key or environment variable overrides this internal pagination, so the roughly 100-commit batch should be treated as an implementation detail that can change between releases. For repositories over 100k commits, the topological sort can run before the virtualized list renders, potentially blocking the UI on first load; this behavior may differ between Windows and macOS builds. To verify, open a large merge-heavy repository, apply a low Limit, and compare whether commits appear in consistent increments and whether the initial stall varies across platforms. Review the installed release notes for history paging or virtualization changes before assuming behavior persists across versions.