fix: write messages from session in a batch for efficiency
fixes: https://github.com/block/goose/issues/5576
this will write it at once, vs message by message. I have tested this cli and desktop, and even with mobile following along reading the DB, and seemed fine (fast even?)
@DOsinga I don't know what downside of doing this is vs status quo, I don't think it is a massive saving, "felt fast" but surely there aren't that many messages coming in.
I actually don't think this is the fix for the reported issue; that was talking about how web hammers the database. if you do a web session and then open that web session in goose, you can clearly see what happens. web writes streaming messages in one by one and then agent writes the resulting message. so the fix is really simple:
https://github.com/block/goose/pull/5601
#5601 has been merged. going to close this out now, but feel free to reopen if there is still something missing @michaelneale
yep, not needed, and not in right area.