changeset 9094:5488166d32ee

Fixed: major performance bug in tkh calculation leads to many river requests
author gernotbelger
date Fri, 25 May 2018 15:41:51 +0200
parents 280c5b44f219
children 1b24fdbf7fe2
files artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/tkhstate/TkhCalculation.java
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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));
 

http://dive4elements.wald.intevation.org