]> gerrit.simantics Code Review - simantics/district.git/blobdiff - org.simantics.district.network/src/org/simantics/district/network/profile/ThrottledStyleBase.java
Disable throttling for now, as it doens't work.
[simantics/district.git] / org.simantics.district.network / src / org / simantics / district / network / profile / ThrottledStyleBase.java
index f8b817ae2811143b2f1c92c34d214fc5ea777e58..67ca25952522f41caa0b7a59a163131fa2a7b878 100644 (file)
@@ -74,12 +74,13 @@ public abstract class ThrottledStyleBase<Result> extends StyleBase<Optional<Resu
     @Override
     public final Optional<Result> calculateStyle(ReadGraph graph, Resource runtimeDiagram, Resource entry,
             Resource groupItem) throws DatabaseException {
-        long currentTimestamp = System.currentTimeMillis();
-        if (lastCalculateTimestamp > (currentTimestamp - interval.get())) {
-            LOGGER.debug("Throttling result calculation for {} {} {} {}", runtimeDiagram, entry, groupItem, interval.get());
-            return Optional.empty();
-        }
-        lastCalculateTimestamp = currentTimestamp;
+// Needs fixing - this will result registration of listeners for nothing in the cache
+//        long currentTimestamp = System.currentTimeMillis();
+//        if (lastCalculateTimestamp > (currentTimestamp - interval.get())) {
+//            LOGGER.debug("Throttling result calculation for {} {} {} {}", runtimeDiagram, entry, groupItem, interval.get());
+//            return Optional.empty();
+//        }
+//        lastCalculateTimestamp = currentTimestamp;
         // let's calculate
         return Optional.ofNullable(calculateThrottledStyle(graph, runtimeDiagram, entry, groupItem));
     }