forked from MTSR/mapserver
tile gc
This commit is contained in:
parent
13aade9bcc
commit
bd630ef7d0
@ -30,6 +30,10 @@ func getKey(pos *coords.TileCoords) []byte {
|
||||
return []byte(fmt.Sprintf("%d/%d/%d/%d", pos.X, pos.Y, pos.Zoom, pos.LayerId))
|
||||
}
|
||||
|
||||
func (this *TileDB) GC() {
|
||||
this.db.RunValueLogGC(0.7)
|
||||
}
|
||||
|
||||
func (this *TileDB) GetTile(pos *coords.TileCoords) ([]byte, error) {
|
||||
var tile []byte
|
||||
err := this.db.View(func(txn *badger.Txn) error {
|
||||
|
@ -60,5 +60,9 @@ func incrementalRender(ctx *app.App, jobs chan *coords.TileCoords) {
|
||||
"secondsDiff": millisDiff / 1000,
|
||||
}
|
||||
logrus.WithFields(fields).Info("incremental rendering")
|
||||
|
||||
//tile gc
|
||||
ctx.TileDB.GC()
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -96,5 +96,8 @@ func initialRender(ctx *app.App, jobs chan *coords.TileCoords) {
|
||||
}
|
||||
logrus.WithFields(fields).Info("Initial rendering")
|
||||
|
||||
//tile gc
|
||||
ctx.TileDB.GC()
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user