use smaller delta node bunch size

master
Oliver Tonnhofer 2013-05-06 11:09:21 +02:00
parent 045a00c84f
commit 80d813d217
1 changed files with 2 additions and 2 deletions

4
cache/delta.go vendored
View File

@ -93,7 +93,7 @@ func NewDeltaCoordsCache(path string) (*DeltaCoordsCache, error) {
}
coordsCache.lruList = list.New()
coordsCache.table = make(map[int64]*CoordsBunch)
coordsCache.capacity = 1024
coordsCache.capacity = 1024 * 8
coordsCache.freeNodes = make([][]element.Node, 0)
return &coordsCache, nil
}
@ -196,7 +196,7 @@ func (p *DeltaCoordsCache) getCoordsPacked(bunchId int64, nodes []element.Node)
}
func getBunchId(nodeId int64) int64 {
return nodeId / (1024 * 8)
return nodeId / (64)
}
func (self *DeltaCoordsCache) getBunch(bunchId int64) *CoordsBunch {