Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ether/etherpad
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: develop
Choose a base ref
...
head repository: ether/etherpad
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: perf/dive-combined
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 3 files changed
  • 2 contributors

Commits on May 16, 2026

  1. perf: don't log settings.loadTest warning per-message (#7756)

    CPU profile of develop (and of the open #7775 branch) at the
    100-400 author dive sweep attributed ~4% of total process CPU to
    log4js inside SecurityManager.checkAccess. Tracing the actual log
    call: line 79-80 emits `console.warn('bypassing socket.io
    authentication...')` on every checkAccess invocation when
    settings.loadTest is true — once per inbound message. With log4js's
    replaceConsole + cluster-mode dispatch enabled, that warning
    allocated, formatted, and dispatched a LogEvent through
    sendToListeners -> sendLogEventToAppender for every CLIENT_READY,
    COMMIT_CHANGESET, USERINFO_UPDATE, etc.
    
    settings.loadTest is a configuration choice, not a per-request
    condition. The warning belongs at startup. Move it to Settings.ts
    init alongside the other "you set X, beware" warnings, and drop
    the per-message branch (the loadTest short-circuit still applies).
    
    Test plan:
    - tests/backend/specs/api/sessionsAndGroups.ts: 32 passing
    - tests/backend/specs/socketio.ts: 39 passing (handleMessage paths)
    
    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
    JohnMcLear and claude committed May 16, 2026
    Configuration menu
    Copy the full SHA
    620c8b2 View commit details
    Browse the repository at this point in the history
  2. perf: avoid throw-as-control-flow in SessionManager hot path (#7756)

    CPU profile of the SUT at the 100-400 author dive sweep
    (load-test workflow run 25956384097) attributed about 6% of total
    process CPU to the throw + catch around getSessionInfo:
    
      - ~1.82% to `new CustomError('sessionID does not exist', 'apierror')`
        construction (stack trace capture)
      - ~4.12% downstream, via the catch block's `console.debug(...)`
        routed through log4js -> sendToListeners -> sendLogEventToAppender
    
    Both call sites (`findAuthorID` on every CLIENT_READY, and
    `listSessionsWithDBKey` on session listing) immediately caught
    `apierror` and discarded it. The public `exports.getSessionInfo`
    contract still has to throw for the HTTP API (returning code:1 for
    missing sessionID), so introduce a private `getSessionInfoOrNull`
    helper that returns null and have the hot-path callers use it
    directly. `exports.getSessionInfo` is kept as a thin wrapper that
    preserves the existing throw semantics.
    
    No behaviour change for the HTTP API — sessionsAndGroups.ts test
    file (32 cases, including "getSessionInfo of deleted session"
    expecting code:1) passes unchanged.
    
    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
    JohnMcLear and claude committed May 16, 2026
    Configuration menu
    Copy the full SHA
    8db7988 View commit details
    Browse the repository at this point in the history
Loading