paritytech / bench-bot

ISC License
9 stars 19 forks source link

Fix unresponsiveness during benchmark execution #68

Open joao-paulo-parity opened 3 years ago

joao-paulo-parity commented 3 years ago

In https://github.com/paritytech/polkadot/pull/3862 we saw the bot not being responsive. That happened because a benchmark was being executed in the meantime and, since we're executing the commands synchronously, the main thread becomes blocked until the command is finished, therefore the bot is not able to respond to new requests.

https://github.com/paritytech/bench-bot/blob/992a8af4c5bf72ee5e08bcd109dfa5a0e37f16a0/bench.js#L37

We do not want to block the main thread but instead stay responsive and continue accepting new requests while a benchmark is currently being executed.

The overhead from using asynchronous Node.js APIs might be an unsolvable problem and thus we'd have to rewrite the bot in a more performant language.