Repository navigation
v0.2.1
npm install -g pi-durable-botFaster
- Every
potscommand starts in about 0.65 s instead of 2.9 s. A command loads only the code it uses, and Node keeps the compiled code of pots for the next run. The bot and its scripts callpotsoften, so this is the change you will feel most. - The gateway is ready in about 1.6 s instead of 3.0 s. It loads pi's model layer without pi's terminal interface, and checks
sudowhile it starts instead of before. pots traceon a week of spans: 0.9 s instead of 15.7 s. It finds the spans that link to a wake in one pass. The output is the same.- Fewer SQL statements per event and per wake decision, and one time formatter for wake texts: 2000 messages from one place go into the log about 15% faster.
- The idle gateway uses about 20 MB less memory.
Nothing else changes: the commands and their output, bot.json, the prompt, the log tables and the channels work as before.
Fixed
- A bot that fails while it stops now always stops its gateway and closes its file. Before, a deleted bot could stay connected to its chat apps.
Tested
New tests run the pots command line and change bot.json while the gateway runs, from outside. All 66 tests and the TLA+ models pass.