diff --git a/source/de/anomic/kelondro/text/ReferenceContainerCache.java b/source/de/anomic/kelondro/text/ReferenceContainerCache.java index e5ca3c0dc..5843b4e97 100644 --- a/source/de/anomic/kelondro/text/ReferenceContainerCache.java +++ b/source/de/anomic/kelondro/text/ReferenceContainerCache.java @@ -427,6 +427,10 @@ public final class ReferenceContainerCache exte synchronized (cache) { ReferenceContainer containerNew = cache.put(tha, container); if (containerNew == null) return; + if (container == containerNew) { + // The containers are the same, so nothing needs to be done + return; + } // Now merge the smaller container into the lager. // The other way around can become very slow if (container.size() >= containerNew.size()) {