You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by he...@apache.org on 2026/06/14 11:30:14 UTC
(pekko) 01/01: Merge remote-tracking branch 'origin/main' into scala3-upgrade-fix-warnings
This is an automated email from the ASF dual-hosted git repository.
He-Pin pushed a commit to branch scala3-upgrade-fix-warnings
in repository https://gitbox.apache.org/repos/asf/pekko.git
commit f8a1931cca75c017d9aea9a3dbd8571d9ee26b32
Merge: 683f8740c3 03ebaf59bb
Author: 虎鸣 <he...@alibaba-inc.com>
AuthorDate: Sun Jun 14 19:27:34 2026 +0800
Merge remote-tracking branch 'origin/main' into scala3-upgrade-fix-warnings
# Conflicts:
# stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala
.../stream/AsyncBoundaryThroughputBenchmark.scala | 123 +++++++++++++++++++
.../pekko/stream/BroadcastHubBenchRunner.scala | 113 ++++++++++++++++++
.../pekko/stream/BroadcastHubBenchmark.scala | 50 +++++++-
.../pekko/stream/MaterializerWiringBenchmark.scala | 132 +++++++++++++++++++++
.../pekko/cluster/sharding/ClusterSharding.scala | 66 +++++------
.../pekko/cluster/sharding/ShardCoordinator.scala | 8 +-
.../pekko/cluster/sharding/ShardRegion.scala | 8 +-
project/PekkoBuild.scala | 3 +-
.../future-lazy-vals.excludes | 21 ++++
.../org/apache/pekko/stream/scaladsl/HubSpec.scala | 45 +++++++
.../impl/PhasedFusingActorMaterializer.scala | 82 +++++++++----
.../pekko/stream/impl/TraversalBuilder.scala | 4 +-
.../org/apache/pekko/stream/scaladsl/Hub.scala | 72 +++++++----
13 files changed, 632 insertions(+), 95 deletions(-)
diff --cc stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala
index bf05d761d9,8849529e6d..32e647841f
--- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala
+++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala
@@@ -541,10 -541,13 +541,13 @@@ private[pekko] class BroadcastHub[T](st
* by reading from the broadcast queue. Consumers that are blocked (due to reaching tail) request
* a wakeup and update their position at the same time.
*
+ * Each slot uses a LongMap keyed by Consumer.id for O(1) add/remove without Long boxing.
+ * Empty slots are null (no backing map allocated), reducing baseline memory and GC pressure.
+ * When a slot drains to zero consumers, its map is released (set to null).
*/
- private[this] val consumerWheel =
+ private val consumerWheel =
- Array.fill[java.util.ArrayList[Consumer]](bufferSize * 2)(new util.ArrayList[Consumer]())
+ new Array[LongMap[Consumer]](bufferSize * 2)
- private[this] var activeConsumers = 0
+ private var activeConsumers = 0
override def preStart(): Unit = {
setKeepGoing(true)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org