fastwebsockets
fastwebsockets copied to clipboard
perf: eliminate frame write fragmentation and optimize buffer management
- Replace write_vectored with single-buffer writes to avoid fragmentation
- Optimize buffer allocation patterns for small/large frames
- Improve masking performance with 64-bit operations and better alignment
- Add fast-mode constructor with performance-optimized defaults
- Reduce unnecessary buffering in read path for large payloads
Addresses feedback about performance parity with simpler WebSocket implementations. Eliminates the main performance bottlenecks: header/payload fragmentation, excessive buffering, and suboptimal memory access patterns.