This commit is contained in:
Sushil-19 2026-05-21 21:55:05 -07:00 committed by GitHub
commit 055ddce259
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -426,10 +426,17 @@ func (r *mapRenderer) writeFinishedMaps(pauseCb func() bool) error {
} }
// add or update filter rows // add or update filter rows
for rowIndex := uint32(0); rowIndex < r.f.mapHeight; rowIndex++ { for rowIndex := uint32(0); rowIndex < r.f.mapHeight; rowIndex++ {
var ( base := len(r.finishedMaps)
mapIndices []uint32 extra := 0
rows []FilterRow if newRange.maps.AfterLast() == r.finished.AfterLast() {
) if oldRange.maps.AfterLast() > r.finished.AfterLast() {
extra = int(oldRange.maps.AfterLast() - r.finished.AfterLast())
}
}
capacity := base + extra
mapIndices := make([]uint32, 0, capacity)
rows := make([]FilterRow, 0, capacity)
for mapIndex := range r.finished.Iter() { for mapIndex := range r.finished.Iter() {
row := r.finishedMaps[mapIndex].filterMap[rowIndex] row := r.finishedMaps[mapIndex].filterMap[rowIndex]
if fm, _ := r.f.filterMapCache.Get(mapIndex); fm != nil && row.Equal(fm[rowIndex]) { if fm, _ := r.f.filterMapCache.Get(mapIndex); fm != nil && row.Equal(fm[rowIndex]) {