performance fix

This commit is contained in:
Arndt Brenschede 2018-09-13 13:07:16 +02:00
parent 02520733cc
commit 0fe6773536
3 changed files with 3 additions and 3 deletions

View file

@ -78,7 +78,7 @@ public final class ProfileCache
rc.expctxWay.setAllTagsUsed(); rc.expctxWay.setAllTagsUsed();
} }
lastProfileTimestamp = profileFile.lastModified(); lastProfileTimestamp = rc.profileTimestamp;
lastLookupTimestamp = lookupFile.lastModified(); lastLookupTimestamp = lookupFile.lastModified();
lastProfileFile = profileFile; lastProfileFile = profileFile;
lastLookupFile = lookupFile; lastLookupFile = lookupFile;

View file

@ -289,8 +289,6 @@ public class RoutingEngine extends Thread
listOne.add( seedPoint ); listOne.add( seedPoint );
matchWaypointsToNodes( listOne ); matchWaypointsToNodes( listOne );
routingContext.countTraffic = true;
findTrack( "seededSearch", seedPoint, null, null, null, false ); findTrack( "seededSearch", seedPoint, null, null, null, false );
} }
catch( IllegalArgumentException e) catch( IllegalArgumentException e)
@ -310,6 +308,7 @@ public class RoutingEngine extends Thread
} }
finally finally
{ {
ProfileCache.releaseProfile( routingContext );
if ( nodesCache != null ) if ( nodesCache != null )
{ {
nodesCache.close(); nodesCache.close();

View file

@ -114,6 +114,7 @@ public class BRouter
re = new RoutingEngine( "mytrack", "mylog", args[0], wplist, rc ); re = new RoutingEngine( "mytrack", "mylog", args[0], wplist, rc );
re.boundary = boundary; re.boundary = boundary;
re.airDistanceCostFactor = rc.trafficDirectionFactor; re.airDistanceCostFactor = rc.trafficDirectionFactor;
rc.countTraffic = true;
re.doSearch(); re.doSearch();
if ( re.getErrorMessage() != null ) if ( re.getErrorMessage() != null )
{ {