Skip to content

Remove auto-started io pool to reduce memory usage#51

Merged
benoitc merged 1 commit intomainfrom
refactor/remove-auto-io-pool
Mar 23, 2026
Merged

Remove auto-started io pool to reduce memory usage#51
benoitc merged 1 commit intomainfrom
refactor/remove-auto-io-pool

Conversation

@benoitc
Copy link
Owner

@benoitc benoitc commented Mar 23, 2026

Summary

  • Remove auto-started io pool at application startup
  • Users can create pools on demand via py_context_router:start_pool/3
  • Reduces memory usage by not creating 10 unused Python contexts

Changes

  • py_context_init.erl: Only start default pool
  • Documentation updated to show manual pool creation
  • Test suite updated to create io pool in setup

The io pool is no longer started automatically at application startup.
Users who need a dedicated I/O pool can create one manually via
py_context_router:start_pool(io, 10, worker).

This reduces memory usage by not creating 10 Python contexts that
many applications never use.
@benoitc benoitc merged commit 039e864 into main Mar 23, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant