improve performance of WebSocket for large messages