forked from KickTalkOrg/KickTalk
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
Problem
Connection setup takes 2.1s average vs 500ms target due to sequential authentication pattern in SharedKickPusher.
Impact
- Slow app startup with multiple chatrooms
- Poor user experience when adding new rooms
- Exponential scaling issues (5 rooms = 12s setup)
Root Cause
// sharedKickPusher.js:410-431 - Sequential auth blocks parallel connection
for (const event of userEvents) {
const AuthToken = await window.app.kick.getKickAuthForEvents(event, this.socketId);
// Each auth call blocks next connection
}Solution
- Implement parallel authentication using Promise.all()
- Add shared connection pool with authentication caching
- Remove artificial stagger delays where unnecessary
Success Criteria
- Connection setup <800ms for 5 chatrooms
- Parallel authentication implementation
- 99.5%+ connection success rate maintained
Files to Modify
utils/services/kick/sharedKickPusher.jsutils/services/connectionManager.js
Priority: P0 (Critical)
Estimated Effort: 2-3 days
Reactions are currently unavailable