initialize coordsBunch map with capacity size

master
Oliver Tonnhofer 2013-11-13 13:17:24 +01:00
parent 4fe7379dcd
commit c3f9992f18
1 changed files with 1 additions and 1 deletions

2
cache/delta.go vendored
View File

@ -113,9 +113,9 @@ func newDeltaCoordsCache(path string) (*DeltaCoordsCache, error) {
}
coordsCache.bunchSize = int64(globalCacheOptions.Coords.BunchSize)
coordsCache.lruList = list.New()
coordsCache.table = make(map[int64]*coordsBunch)
// mem req for cache approx. capacity*bunchSize*40
coordsCache.capacity = int64(globalCacheOptions.Coords.BunchCacheCapacity)
coordsCache.table = make(map[int64]*coordsBunch, coordsCache.capacity)
return &coordsCache, nil
}