goose icon indicating copy to clipboard operation
goose copied to clipboard

fix: write messages from session in a batch for efficiency

Open michaelneale opened this issue 1 month ago • 1 comments

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.

michaelneale avatar Nov 06 '25 04:11 michaelneale

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

DOsinga avatar Nov 06 '25 13:11 DOsinga

#5601 has been merged. going to close this out now, but feel free to reopen if there is still something missing @michaelneale

alexhancock avatar Nov 06 '25 15:11 alexhancock

yep, not needed, and not in right area.

michaelneale avatar Nov 07 '25 07:11 michaelneale