Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Consider disabling WebSocket message splitting when permessage-deflate is off

Đang mở
#7,724 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Ít trao đổi
Công nghệ
typescript, vscode
Lĩnh vực
networking, performance

Hướng nghiên cứu

Bắt đầu bằng cách xem xét ipc.net.ts, đặc biệt là MaxWebSocketMessageLength và hành vi của enableMessageSplitting được mô tả trong issue. So sánh các đường đi có splitting và không splitting trên các kết nối proxied có độ trễ cao, sau đó xác định liệu việc hoàn thành có nghĩa là một thiết lập có thể cấu hình qua CLI hay một giá trị mặc định đã thay đổi được hỗ trợ bởi các kiểm tra về độ trễ và an toàn nén hay không.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

code-server enhancement needs-investigation

WebSocket message splitting adds significant latency for large files on proxied connections

When serving code-server behind a proxy (which is the common production deployment), the 256KB WebSocket message splitting introduced in microsoft/vscode#174278 multiplies per-message RTT overhead significantly for large file operations like image previews.

Background

VS Code splits large IPC messages into 256KB chunks (MaxWebSocketMessageLength = 256 * 1024 in ipc.net.ts) to avoid blocking the Node.js event loop during zlib compression. Each chunk becomes a separate WebSocket message.

The latency problem in proxied deployments

In a proxied deployment (e.g. a gateway in front of a devbox), each WebSocket message incurs a full round-trip. With 100ms RTT between the proxy and the devbox:

  • A 10MB file generates ~40 chunks (10MB ÷ 256KB)
  • Each chunk = one WebSocket message = one round-trip
  • Total overhead: ~40 × 100ms = ~4 seconds of pure latency

We tested image preview times (time from opening a file in the explorer to the image fully rendering) across different file sizes at 100ms simulated RTT:

File size Splitting ON Splitting OFF Improvement
145 KB 2,212ms 2,251ms ~0%
1 MB 1,988ms 1,707ms 14%
1.5 MB 2,093ms 1,412ms 33%
5.6 MB 4,255ms 2,193ms 48%
10.3 MB 7,262ms 2,888ms 60%
Is disabling splitting safe? (Does zlib actually block?)

A few basic tests didn't seem to indicate this issue in our case, but more investigation may be needed

Question

Would you consider making enableMessageSplitting configurable via a CLI flag, or defaulting it to false for single-user deployments?

Happy to submit a PR if there's agreement on the right approach.

Ngôn ngữ chính
TypeScript
Star
79.4k
Fork
6.9k
Merge trung bình
2 ngày 13 giờ
Pull request đã merge (30 ngày)
39

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của coder/code-server

Tất cả issue của coder/code-server

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.