changeset 533:78e0e239a0b9

Calculate results after reaching the output state and store them in cache. gnv-artifacts/trunk@629 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 26 Jan 2010 12:00:20 +0000
parents d2f97cb2ac32
children 92d7a8cd1ef1
files gnv-artifacts/ChangeLog gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/verticalcrosssection/VerticalCrossSectionOutputState.java
diffstat 2 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gnv-artifacts/ChangeLog	Tue Jan 26 10:46:33 2010 +0000
+++ b/gnv-artifacts/ChangeLog	Tue Jan 26 12:00:20 2010 +0000
@@ -1,3 +1,9 @@
+2010-01-26  Ingo Weinzierl <ingo.weinzierl@intevation.de>
+
+	* src/main/java/de/intevation/gnv/state/profile/verticalcrosssection/VerticalCrossSectionOutputState.java:
+	  Calculate results after reaching the final state and store them in cache.
+	  This avoids long latencies for chart creation or exports.
+
 2010-01-26  Ingo Weinzierl <ingo.weinzierl@intevation.de>
 
 	  Issue162
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/verticalcrosssection/VerticalCrossSectionOutputState.java	Tue Jan 26 10:46:33 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/verticalcrosssection/VerticalCrossSectionOutputState.java	Tue Jan 26 12:00:20 2010 +0000
@@ -126,6 +126,13 @@
         this.rangeLabel   = "chart.verticalcrosssection.title.yaxis";
     }
 
+    @Override
+    public void initialize(String uuid, CallContext callContext)
+    throws StateException {
+        super.initialize(uuid, callContext);
+        
+        getChartResult(uuid, callContext);
+    }
 
     @Override
     protected ChartLabels createChartLabels(Locale locale, String uuid) {

http://dive4elements.wald.intevation.org