Skip to content

pyronova: bump to v2.4.2#684

Open
ddxd wants to merge 2 commits intoMDA2AV:mainfrom
leocaolab:pyronova-v2.4.2
Open

pyronova: bump to v2.4.2#684
ddxd wants to merge 2 commits intoMDA2AV:mainfrom
leocaolab:pyronova-v2.4.2

Conversation

@ddxd
Copy link
Copy Markdown
Contributor

@ddxd ddxd commented May 3, 2026

What changed

Engine (v2.4.2 — leocaolab/pyronova)

  • PYRONOVA_WORKERS controls TPC thread count — previously the TPC thread count was driven by PYRONOVA_IO_WORKERS (a Tokio-level knob), while PYRONOVA_WORKERS was silently ignored in TPC mode. Now PYRONOVA_WORKERS is the correct lever, keeping semantics consistent with the non-TPC path.
  • Clippy fixestoo_many_arguments allows on TPC accept functions; get_first() instead of get(0).

Launcher

  • Sets PYRONOVA_WORKERS = sched_getaffinity() so all logical CPUs visible to the container are used. On a Threadripper 32C/64T host this is 64 threads vs. 32 (physical-core auto-detect in v2.3.1). Removes the PYRONOVA_IO_WORKERS override that was incorrectly controlling TPC thread count.

App

  • Per-interpreter pre-serialized bytes cache for /json/{count} and /json-comp/{count} routes. Each sub-interpreter maintains its own dict[tuple, bytes] (max 256 entries) — no lock contention, no Response object reuse. Cache stores compact json.dumps(..., separators=(",", ":")) bytes; each cache hit wraps in a fresh Response().
  • TLS multi-port fix (from v2.4.1): extra_tls_ports no longer accidentally applied the TLS acceptor to the plain-HTTP main port.

Test plan

  • cargo clippy clean
  • cargo test passes locally (52/52)
  • Docker image builds from v2.4.2 tag
  • /json/10 returns correct JSON payload
  • Local wrk baseline: ~420k req/s, json: ~379k req/s

🤖 Generated with Claude Code

- PYRONOVA_WORKERS now controls TPC thread count (was wrongly using
  PYRONOVA_IO_WORKERS which is semantically the Tokio async IO pool)
- Launcher sets PYRONOVA_WORKERS=sched_getaffinity() so all logical
  CPUs are used (64 on Threadripper 32C/64T, vs 32 physical in v2.3.1)
- Per-interpreter pre-serialized bytes cache for json/json-comp routes
  (256-entry cap, no lock contention between sub-interpreters)
- TLS multi-port fix: extra_tls_ports no longer applies TLS acceptor to
  the plain HTTP main port

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The pyronova repo moved from github.com/moomoo-tech to github.com/leocaolab.
GitHub redirects still resolve, but pin the canonical URL so the Arena CI
build and the framework metadata both reference the live org directly.
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