Skip to content

Reduce startup time with optional pre-extracted JNA binaries - #103

Open
dgant wants to merge 3 commits into
JavaBWAPI:developfrom
dgant:codex/pre-extracted-jna-binaries
Open

dgant wants to merge 3 commits into
JavaBWAPI:developfrom
dgant:codex/pre-extracted-jna-binaries

Conversation

@dgant

@dgant dgant commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Most software stacks that run client bots (SC-Docker, Tournament Manager, SCHNAIL, for example) don't bother checking whether the client is connected before starting a game. There's not even an obviously good way to do this.

Instead they just launch the client bot, wait a few seconds, then launch StarCraft and pray the client is ready. This usually works, but when it doesn't, the bot fails to connect. The game is ruined.


This pull request aims to prevent failed connections by reducing the time required for client bots to be ready for connection, by allowing bots to include pre-extracted JNA binaries. You can include them side-by-side with your bot JAR to save time on extracting them before connecting.

These changes were vibecoded but have undergone several rounds of iteration and testing. In fresh-JVM startup tests on Windows with Java 8 x86 and JNA 5.18.1, pre-extracted DLLs reduced median time-to-connection-ready by about 45%.

This branch has not been deployed

No deployments
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