Performance issue on log with file filter and date range
Author: gbonnefilleCreated Sep 18, 2025Updated Oct 1, 2026
I'm running:
commits, err := rep.Log(&git.LogOptions{
All: true,
PathFilter: filter,
Until: conf.DateRange.End,
Since: conf.DateRange.Start,
})On a significant old repository, the processing is long while the date range is short.
Looking at the code, it seems that the date range is applied after the file filtering, while, of course, it is much more efficient to evaluate a date condition than a file condition.
Source: go-git/go-git