Skip to content

Concurrency improvements #164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 11 commits into
base: staging
Choose a base branch
from

Conversation

thewhaleking
Copy link
Collaborator

@thewhaleking thewhaleking commented Aug 1, 2025

Features:

  • True Runtime independence in AsyncSubstrateInterface:
    • ensures no need to reload types from a shared object that may interfere with concurrency
    • increases memory usage slightly, but drops CPU usage dramatically by not needing to reload the type registry when retrieving from cache
  • RuntimeCache improved to automatically add additional mappings
  • Uses a single dispatcher queue for concurrent sending/receiving which eliminates the need for coroutines to manage their own state in regard to connection management.
  • Futures from the Websocket now get assigned their own exceptions
  • Overall cleaner logic flow with regard to rpc requests

TODO:

  • Subscription ID changing

@thewhaleking thewhaleking changed the title [WIP] concurrency improvements Concurrency improvements Aug 1, 2025
@thewhaleking thewhaleking requested a review from a team August 1, 2025 14:15
@thewhaleking thewhaleking added run-bittensor-sdk-tests Runs Bittensor SDK tests. run-bittensor-cli-tests Runs BTCLI tests. labels Aug 1, 2025
@thewhaleking thewhaleking marked this pull request as ready for review August 1, 2025 14:16
@thewhaleking thewhaleking marked this pull request as draft August 1, 2025 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-bittensor-cli-tests Runs BTCLI tests. run-bittensor-sdk-tests Runs Bittensor SDK tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant