Skip to content

Commit 377240a

Browse files
author
Peter
committed
avoid several stopwatch calls in pathmerger
1 parent 3b19746 commit 377240a

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

core/src/main/java/com/graphhopper/util/PathMerger.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ public class PathMerger
3939
public void doWork( GHResponse rsp, List<Path> paths, Translation tr )
4040
{
4141
int origPoints = 0;
42-
StopWatch sw;
4342
long fullTimeInMillis = 0;
4443
double fullWeight = 0;
4544
double fullDistance = 0;
@@ -56,7 +55,6 @@ public void doWork( GHResponse rsp, List<Path> paths, Translation tr )
5655
if (enableInstructions)
5756
{
5857
InstructionList il = path.calcInstructions(tr);
59-
sw = new StopWatch().start();
6058

6159
if (!il.isEmpty())
6260
{
@@ -77,7 +75,6 @@ public void doWork( GHResponse rsp, List<Path> paths, Translation tr )
7775
fullInstructions.add(i);
7876
fullPoints.add(i.getPoints());
7977
}
80-
sw.stop();
8178

8279
// if not yet reached finish replace with 'reached via'
8380
if (pathIndex + 1 < paths.size())
@@ -97,9 +94,7 @@ public void doWork( GHResponse rsp, List<Path> paths, Translation tr )
9794
if (simplifyResponse)
9895
{
9996
origPoints = tmpPoints.getSize();
100-
sw = new StopWatch().start();
10197
douglasPeucker.simplify(tmpPoints);
102-
sw.stop();
10398
}
10499
fullPoints.add(tmpPoints);
105100
}

core/src/main/java/com/graphhopper/util/StopWatch.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
*/
2525
public class StopWatch
2626
{
27-
2827
private long lastTime;
2928
private long nanoTime;
3029
private String name = "";

0 commit comments

Comments
 (0)