[PATCH] Fixed: major performance bug in tkh calculation leads to many river requests
Wald Commits
scm-commit at wald.intevation.org
Fri May 25 15:41:56 CEST 2018
# HG changeset patch
# User gernotbelger
# Date 1527255711 -7200
# Node ID 5488166d32ee6d45ce96d3b93c59ddd9b2eb4e3f
# Parent 280c5b44f2191ee2d2af9565b8f6cde7876b426a
Fixed: major performance bug in tkh calculation leads to many river requests
diff -r 280c5b44f219 -r 5488166d32ee artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/tkhstate/TkhCalculation.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/tkhstate/TkhCalculation.java Fri May 25 15:05:30 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/tkhstate/TkhCalculation.java Fri May 25 15:41:51 2018 +0200
@@ -153,6 +153,8 @@
final Collection<ResultRow> rows = new ArrayList<>();
+ final String waterlevelLabel = descBuilder.getDesc(wkms);
+
for (final Double stationDbl : allStations) {
final double station = stationDbl;
@@ -164,7 +166,7 @@
final ResultRow row = ResultRow.create();
- row.putValue(SInfoResultType.waterlevelLabel, descBuilder.getDesc(wkms));
+ row.putValue(SInfoResultType.waterlevelLabel, waterlevelLabel);
row.putValue(SInfoResultType.gaugeLabel, riverInfoProvider.findGauge(station));
row.putValue(SInfoResultType.location, riverInfoProvider.getLocation(station));
More information about the Dive4Elements-commits
mailing list