Flirtmetrics
Event-Driven Real-Time Matchmaking & Chat Optimization
Measurable Transformation Metrics
01 / Executive Summary
Optimized a dating app matchmaking page and real-time chat infrastructure. Resolved critical UI thread blockages causing MATCH cards to freeze on swipe, and reduced chat delivery latency from 8 seconds to near-instantaneous (under 200ms) by replacing HTTP polling with WebSockets.
02 / The Challenge
Flirtmetrics was experiencing severe churn during peak hours. When users swiped match cards, the UI would freeze for up to 1.5 seconds due to synchronous Riverpod state rebuilds of the entire card deck. Simultaneously, chat messages took up to 8 seconds to deliver because the client relied on continuous HTTP short-polling, which overwhelmed the network thread and triggered API rate limits.
03 / Research & Diagnostics
Using Dart DevTools and thread profile diagnostics, we tracked the CPU allocation. We discovered that swiping a single card caused the entire list layout of 50+ matches to re-evaluate and rebuild. On the network side, request logs showed that 92% of the HTTP polling requests returned empty responses, wasting bandwidth and blocking the browser/mobile network queues.
04 / Architecture & Strategy
05 / Implementation & Solution
Designed and deployed a custom WebSocket client connection manager in Flutter with automatic heartbeat pinging and auto-reconnection fallback logic. Integrated a local synchronization pipeline that queries local database indexes for instant rendering while background threads sync new messages. Rewrote the card swiping widget using Framer-equivalent Flutter animations with isolated state listeners.




