diff --git a/caffeine/src/javaPoet/java/com/github/benmanes/caffeine/cache/LocalCacheSelectorCode.java b/caffeine/src/javaPoet/java/com/github/benmanes/caffeine/cache/LocalCacheSelectorCode.java index 33e48a050a..dee194119e 100644 --- a/caffeine/src/javaPoet/java/com/github/benmanes/caffeine/cache/LocalCacheSelectorCode.java +++ b/caffeine/src/javaPoet/java/com/github/benmanes/caffeine/cache/LocalCacheSelectorCode.java @@ -102,7 +102,8 @@ private LocalCacheSelectorCode expires() { private LocalCacheSelectorCode fastpath() { block.beginControlFlow("if (fastpath)") - .addStatement("sb.append('F')") + .addStatement("// disabled due to unfavorable benchmarks") + .addStatement("// sb.append('F')") .endControlFlow(); return this; } diff --git a/caffeine/src/main/java/com/github/benmanes/caffeine/cache/BoundedLocalCache.java b/caffeine/src/main/java/com/github/benmanes/caffeine/cache/BoundedLocalCache.java index 2c1c7e5f80..78cc2f4dd0 100644 --- a/caffeine/src/main/java/com/github/benmanes/caffeine/cache/BoundedLocalCache.java +++ b/caffeine/src/main/java/com/github/benmanes/caffeine/cache/BoundedLocalCache.java @@ -787,7 +787,9 @@ void afterRead(Node node, long now, boolean recordHit) { } node.setAccessTime(now); - boolean delayable = canFastpath(node) || (readBuffer.offer(node) != Buffer.FULL); + // fastpath is disabled due to unfavorable benchmarks + // boolean delayable = canFastpath(node) || (readBuffer.offer(node) != Buffer.FULL); + boolean delayable = (readBuffer.offer(node) != Buffer.FULL); if (shouldDrainBuffers(delayable)) { scheduleDrainBuffers(); } diff --git a/caffeine/src/test/java/com/github/benmanes/caffeine/cache/BoundedLocalCacheTest.java b/caffeine/src/test/java/com/github/benmanes/caffeine/cache/BoundedLocalCacheTest.java index a1dca436f7..4748ff864f 100644 --- a/caffeine/src/test/java/com/github/benmanes/caffeine/cache/BoundedLocalCacheTest.java +++ b/caffeine/src/test/java/com/github/benmanes/caffeine/cache/BoundedLocalCacheTest.java @@ -294,7 +294,7 @@ public void exceedsMaximumBufferSize_onWrite(Cache cache) { assertThat(localCache.writeQueue(), hasSize(0)); } - @Test(dataProvider = "caches") + @Test(enabled = false, dataProvider = "caches") @CacheSpec(compute = Compute.SYNC, implementation = Implementation.Caffeine, population = Population.PARTIAL, maximumSize = MaximumSize.FULL, weigher = {CacheWeigher.DEFAULT, CacheWeigher.TEN}, @@ -330,7 +330,7 @@ public void fastpath(Cache cache, CacheContext context) { assertThat(middle.getMoveCount(), is(initialMoveCount + 1)); } - @Test(dataProvider = "caches") + @Test(enabled = false, dataProvider = "caches") @CacheSpec(compute = Compute.SYNC, implementation = Implementation.Caffeine, population = Population.FULL, maximumSize = MaximumSize.FULL, weigher = CacheWeigher.DEFAULT, expireAfterAccess = Expire.DISABLED, expireAfterWrite = Expire.DISABLED,