This repository has been archived by the owner on Oct 5, 2023. It is now read-only.
[Q/A] Why does the subscriptions websocket returns the entire story text every time? Why not just the diff? #260
Labels
question
Further information is requested
🤓 Question
I was playing the same story for a while and it got big. Over 8k lines and 400kb. My last inputs and remember are sane size (remember is below 2kb). I was starting to get plagued with "AI is busy" messages so I decided to debug.
I found out that subscription websocket (wss://api.aidungeon.io/subscriptions) returns the entire story after every command and during every KA. In my case, over 1MB of text send every 10 seconds (for KA) and after every action. No wonder I was getting timeouts.
Why was it planned this way, especially for single player adventures? Why not return just the modified text? Alter / revert commands work on the history anyway, so they apply locally after an ack from the server. Additions are easy and the client and server can verify integrity using a checksum after applying the last command then request the entire text on failure.
The text was updated successfully, but these errors were encountered: