# HG changeset patch # User Ingo Weinzierl # Date 1275472359 0 # Node ID 58b4a07db8564f440235f6c11bd590e83df742df # Parent 13bea93a070a038197f0e10018420a3d32afdd44 Cach improvement: remove the cached elements of each visited state that is visited while stepping back to a previous state. gnv-artifacts/trunk@1147 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 13bea93a070a -r 58b4a07db856 gnv-artifacts/ChangeLog --- a/gnv-artifacts/ChangeLog Tue Jun 01 16:59:15 2010 +0000 +++ b/gnv-artifacts/ChangeLog Wed Jun 02 09:52:39 2010 +0000 @@ -1,3 +1,9 @@ +2010-06-02 Ingo Weinzierl + + * src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java: Remove + cached elements of each state that is visited while stepping back to a + previous state. + 2010-06-01 Ingo Weinzierl * src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java: Do not diff -r 13bea93a070a -r 58b4a07db856 gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java --- a/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java Tue Jun 01 16:59:15 2010 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java Wed Jun 02 09:52:39 2010 +0000 @@ -191,7 +191,9 @@ } // step backward - else if((next = getPreviousState(current, targetState)) != null) { + else if((next = getPreviousState(current, targetState, context)) + != null) + { if (current != null) { current.endOfLife(context.globalContext()); @@ -292,7 +294,9 @@ /** * Step back to the previous state specified by name. */ - protected State getPreviousState(State current, String name) { + protected State getPreviousState( + State current, String name, CallContext context) + { if (current == null) { return null; } @@ -301,7 +305,8 @@ return current; } else { - return getPreviousState(current.getParent(), name); + current.endOfLife(context); + return getPreviousState(current.getParent(), name, context); } }