tile render timing
This commit is contained in:
parent
d0e23bb114
commit
a2d8d3ba67
@ -5,8 +5,8 @@ import (
|
||||
"mapserver/db"
|
||||
"mapserver/mapblockaccessor"
|
||||
"mapserver/mapblockrenderer"
|
||||
"mapserver/params"
|
||||
"mapserver/mapobjectdb"
|
||||
"mapserver/params"
|
||||
"mapserver/tilerenderer"
|
||||
"mapserver/worldconfig"
|
||||
)
|
||||
|
@ -5,8 +5,8 @@ import (
|
||||
"mapserver/db"
|
||||
"mapserver/mapblockaccessor"
|
||||
"mapserver/mapblockrenderer"
|
||||
"mapserver/params"
|
||||
"mapserver/mapobjectdb"
|
||||
"mapserver/params"
|
||||
"mapserver/tilerenderer"
|
||||
"mapserver/worldconfig"
|
||||
|
||||
|
@ -4,6 +4,7 @@ import (
|
||||
"github.com/sirupsen/logrus"
|
||||
"mapserver/app"
|
||||
"mapserver/coords"
|
||||
"time"
|
||||
)
|
||||
|
||||
func Job(ctx *app.App) {
|
||||
@ -16,6 +17,8 @@ func Job(ctx *app.App) {
|
||||
lastcoords := coords.NewMapBlockCoords(rstate.LastX, rstate.LastY, rstate.LastZ)
|
||||
|
||||
for true {
|
||||
start := time.Now()
|
||||
|
||||
hasMore, newlastcoords, mblist, err := ctx.BlockAccessor.FindLegacyMapBlocks(lastcoords, ctx.Config.InitialRenderingFetchLimit, ctx.Config.Layers)
|
||||
|
||||
if err != nil {
|
||||
@ -73,11 +76,15 @@ func Job(ctx *app.App) {
|
||||
rstate.LastZ = lastcoords.Z
|
||||
ctx.Config.Save()
|
||||
|
||||
t := time.Now()
|
||||
elapsed := t.Sub(start)
|
||||
|
||||
fields = logrus.Fields{
|
||||
"count": len(mblist),
|
||||
"X": lastcoords.X,
|
||||
"Y": lastcoords.Y,
|
||||
"Z": lastcoords.Z,
|
||||
"elapsed": elapsed,
|
||||
}
|
||||
logrus.WithFields(fields).Info("Initial rendering")
|
||||
}
|
||||
|
@ -4,8 +4,8 @@ import (
|
||||
"fmt"
|
||||
"mapserver/coords"
|
||||
"mapserver/db"
|
||||
"mapserver/mapblockparser"
|
||||
"mapserver/layer"
|
||||
"mapserver/mapblockparser"
|
||||
"time"
|
||||
|
||||
cache "github.com/patrickmn/go-cache"
|
||||
|
@ -10,7 +10,6 @@ type Tile struct {
|
||||
Mtime int64
|
||||
}
|
||||
|
||||
|
||||
type MapObject struct {
|
||||
//mapblock position
|
||||
MBPos coords.MapBlockCoords
|
||||
|
@ -4,7 +4,6 @@ import (
|
||||
"mapserver/coords"
|
||||
)
|
||||
|
||||
|
||||
func (db *Sqlite3Accessor) GetMapData(q SearchQuery) ([]MapObject, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ import (
|
||||
"mapserver/coords"
|
||||
)
|
||||
|
||||
|
||||
const getTileQuery = `
|
||||
select data,mtime from tiles t
|
||||
where t.layerid = ?
|
||||
|
@ -10,8 +10,8 @@ import (
|
||||
"mapserver/layer"
|
||||
"mapserver/mapblockaccessor"
|
||||
"mapserver/mapblockrenderer"
|
||||
"mapserver/testutils"
|
||||
"mapserver/mapobjectdb"
|
||||
"mapserver/testutils"
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user