The GitHub Actions job "Pull Requests" on 
pekko.git/perf/fanout-publisher-cursor-scan has succeeded.
Run started by GitHub user He-Pin (triggered by He-Pin).

Head commit for run:
9bed9a0e523da8c7356f46a5928306459584c018 / 虎鸣 <[email protected]>
Avoid quadratic cursor scans in fanout publishers

Motivation:
The GraphStage fanout publisher retains a shared ring buffer that scans all
cursors for every equally paced reader, requiring O(N^2) cursor work per 
element.

Modification:
Count readers at the oldest position and rescan only when the last reader
advances or cancels. Preserve lazy cursor initialization and registration,
add complexity and lifecycle regressions plus JMH coverage, and document
the shared-buffer behavior.

Result:
Cursor maintenance becomes linear for equally paced readers without changing
public APIs or terminal signals. Local JDK 17 publisher benchmarks improve
3.51x with 32 subscribers and 26.58x with 128 under continuous demand.

Tests:
- Original implementation: complexity regression fails as intended, 1088 > 128.
- Updated ring buffer and fanout publisher focused tests: 22 passed.
- Expanded Scala/Java stream regression tests: 115 passed.
- FanoutPublisherTest Reactive Streams TCK: 31 passed, 7 untested cases skipped.
- Native scalafmt, sortImports, checkCodeStyle and git diff --check: passed.
- +mimaReportBinaryIssues (Scala 2.13.18 and 3.3.9) and docs/paradox: passed.
- Before/after JMH: 2 forks, 3 x 1 s warmup, 5 x 1 s measurement, passed.

References:
Refs #2874; related prior BroadcastHub exploration #1705.

Report URL: https://github.com/apache/pekko/actions/runs/40934350685

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to