plotly / plotly/plotly.js

[CHORE]: remove `scatter` trace from custom bundle

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

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

chore P3 plotly-internal size: 5 task
Ngôn ngữ chính
JavaScript
Star
18.3k
Fork
2k
Merge trung bình
2 ngày 12 giờ
Pull request đã merge (30 ngày)
28

Mô tả

Quoted from https://github.com/plotly/plotly.js/blob/main/CUSTOM_BUNDLE.md:

Please note that the scatter trace is currently included in all bundles and cannot be removed. This behaviour may change in the future, so we recommend that you explicitly include scatter anyway if you need it in your bundle.

There was previously an attempt to make scatter optional in #5535, but that PR was closed without being merged.

Since plotly.js is relatively large even when using a custom bundle, being able to exclude unused traces such as scatter would help further reduce the bundle size.

I'm not sure how much bundle size reduction this would result in, since scattergl, scatterternary and some other traces reuse parts of the scatter implementation. Still, it seems useful for custom bundles to avoid including trace modules that are not explicitly requested where possible.

Would it be worth to re-consider this optimization?

If scatter still needs to be included for architectural reasons, it may be worth updating the documentation? Since the PR is closed.

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.

Hướng nghiên cứu

Bắt đầu với CUSTOM_BUNDLE.md và cuộc thảo luận đã đóng #5535 để hiểu ràng buộc hiện tại khi bundling các trace scatter. Kiểm tra xem các bundle tùy chỉnh có thể loại trừ scatter mà không làm hỏng scattergl, scatterternary hoặc các trace phụ thuộc khác hay không. Hoàn thành có nghĩa là scatter không được yêu cầu được loại trừ an toàn, hoặc tài liệu giải thích rõ ràng lý do nó phải tiếp tục được включed.

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

Đánh giá

Công nghệ
javascript
Lĩnh vực
build-system, data-visualization
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
38/100

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.