Skip to content
This repository was archived by the owner on Apr 7, 2019. It is now read-only.

Commit

Permalink
ignore initial block mtime if initial tiles are rendered
Browse files Browse the repository at this point in the history
  • Loading branch information
naturefreshmilk committed Jul 6, 2018
1 parent 0b5357d commit bee4741
Showing 1 changed file with 17 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,28 @@ public void run() {
}

if (latestTimestamp == null) {
logger.debug("Gathering latest tile time from tile cache");
long start = System.currentTimeMillis();

latestTimestamp = tileCache.getLatestTimestamp();

long diff = System.currentTimeMillis() - start;
if (cfg.tilerendererEnableInitialRendering()){
logger.info("Initial rendering detected, ignoring updated blocks since now");
latestTimestamp = System.currentTimeMillis();

} else {

logger.debug("Gathering latest tile time from tile cache");
long start = System.currentTimeMillis();

latestTimestamp = tileCache.getLatestTimestamp();

logger.debug("Newest tile time is {}", latestTimestamp);
long diff = System.currentTimeMillis() - start;

if (diff > 1000){
logger.warn("Tile time fetch took {} ms", diff);
logger.debug("Newest tile time is {}", latestTimestamp);

if (diff > 1000){
logger.warn("Tile time fetch took {} ms", diff);
}
}

}

try {
Expand Down

0 comments on commit bee4741

Please sign in to comment.