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: taskiq-python/natsrpy
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: taskiq-python/natsrpy
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: copilot/optimize-data-conversions-locking
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 16 files changed
  • 3 contributors

Commits on Mar 27, 2026

  1. Optimize core NATS pub/sub performance

    1. Rewrite CallbackSubscription: Replace Mutex+timeout polling with
       channel-based unsubscribe signaling and tokio::select!, eliminating
       per-message Mutex lock/unlock and timer creation overhead.
    
    2. Switch nats_session from tokio::sync::RwLock to std::sync::RwLock:
       Clone Client synchronously before entering async futures, removing
       async lock acquisition from the hot path. Also fix flush() which
       incorrectly used write() instead of read().
    
    3. Optimize process_message GIL usage: Combine two GIL acquisitions
       (Message conversion + callback invocation) into a single
       Python::attach call via new Message::from_nats_message method.
    
    Agent-Logs-Url: https://github.com/taskiq-python/natsrpy/sessions/03a654d2-e0e5-4c06-8341-b78656505688
    
    Co-authored-by: s3rius <18153319+s3rius@users.noreply.github.com>
    Copilot and s3rius authored Mar 27, 2026
    Configuration menu
    Copy the full SHA
    6f0efae View commit details
    Browse the repository at this point in the history
  2. Made some optimizations.

    s3rius committed Mar 27, 2026
    Configuration menu
    Copy the full SHA
    60a11f1 View commit details
    Browse the repository at this point in the history
Loading