Skip to content

Performance Issue #81

@sajanv88

Description

@sajanv88

When the AI chat is active, other processes become noticeably slower. This happens because the streaming response generates a large number of small updates that keep the event loop busy even though the code uses async.

To prevent this event loop starvation, we can periodically yield control back to the event loop by adding:

await asyncio.sleep(0.01)

This allows other pending tasks to run, improving responsiveness while maintaining the streaming flow.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions