From 40b710e618e334f912b88c7582dd757398d3881a Mon Sep 17 00:00:00 2001 From: Arne Babenhauserheide Date: Tue, 4 Feb 2025 23:17:36 +0100 Subject: [PATCH] reduce 10% chance for bulk to 2% over 5 hops that gives a 10% chance to delay a realtime packet. With 10% that was at 40%, severely impacting the time critical realtime routing. --- src/freenet/node/PeerMessageQueue.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/freenet/node/PeerMessageQueue.java b/src/freenet/node/PeerMessageQueue.java index fd69dfe7a1..14a03870e1 100644 --- a/src/freenet/node/PeerMessageQueue.java +++ b/src/freenet/node/PeerMessageQueue.java @@ -852,8 +852,8 @@ public synchronized MessageItem grabQueuedMessageItem(int minPriority) { >= queuesByPriority[DMT.PRIORITY_REALTIME_DATA].getNextUrgentTime(Long.MAX_VALUE, 0)) { tryRealtimeFirst = true; } else { - // 10% chance to use bulk in case of a draw to avoid starving the bulk queue. - tryRealtimeFirst = this.fastWeakRandom.nextInt(10) > 0; + // 2% chance to use bulk in case of a draw to avoid starving the bulk queue. + tryRealtimeFirst = this.fastWeakRandom.nextInt(50) > 0; }