X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.district.network%2Fsrc%2Forg%2Fsimantics%2Fdistrict%2Fnetwork%2Fprofile%2FThrottledStyleBase.java;h=93af11c4fa633e73dbc8ca4e885fe2e4a45ad599;hb=440c2b11fd49be2feb9edd39b931306b824b8aba;hp=f8b817ae2811143b2f1c92c34d214fc5ea777e58;hpb=8958c9b265fc6a842c76714b60f0d99740434243;p=simantics%2Fdistrict.git diff --git a/org.simantics.district.network/src/org/simantics/district/network/profile/ThrottledStyleBase.java b/org.simantics.district.network/src/org/simantics/district/network/profile/ThrottledStyleBase.java index f8b817ae..93af11c4 100644 --- a/org.simantics.district.network/src/org/simantics/district/network/profile/ThrottledStyleBase.java +++ b/org.simantics.district.network/src/org/simantics/district/network/profile/ThrottledStyleBase.java @@ -38,7 +38,7 @@ public abstract class ThrottledStyleBase extends StyleBase> resultListener; @@ -74,12 +74,13 @@ public abstract class ThrottledStyleBase extends StyleBase 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)); }