Iain-S / sentry-bot

Autonomous Nerf turret
MIT License
3 stars 3 forks source link

Threading/performance #45

Open Iain-S opened 1 year ago

Iain-S commented 1 year ago

We call our TurretController instance directly in the generator that serves video. However, that means that we wait for projectiles to be launched before we can continue serving video (or continue moving). It might be better to run the TurretController in its own thread and send instructions to it asynchronously to move and fire. We could even have a queue so that launching actions could be queued up with multiple clicks.

Extra nice

Iain-S commented 1 year ago

We should also profile the bot so we can see where we're spending most time. Perhaps in a unit test in place of a browser (or not).