angular / angular/components

mat-table laggy behavior with large number of elements

Đang mở
#13,460 8 bình luận 18 reaction 0 người được giao Xem trên GitHub
area: cdk/table P4 perf
Ngôn ngữ chính
TypeScript
Star
25k
Fork
6.8k
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
91

Mô tả

#### Bug, feature request, or proposal:
The mat-table component with selection suffers in performance when the number of elements gets decently large. Selecting a single row or the select all buttons shows a lot of lag that increases as the number of columns increases.

#### What is the expected behavior?
mat-table should be able to support good performance for large number of rows.

#### What is the current behavior?
Slow, laggy animations from clicking on single row checkbox or checkbox for select all

#### What are the steps to reproduce?
Providing a StackBlitz reproduction is the *best* way to share your issue.

https://stackblitz.com/edit/angular-vyv97t
Update table with 100 rows, click a few checkboxes.
Update table with 1,000 rows, click a few checkboxes.
Update table with 10,000 rows, click a few checkboxes.

The performance gets significantly worse.

#### What is the use-case or motivation for changing an existing behavior?
Creating a table which contains lot of entries from the some backend API service. The user should be able to experience smooth UI and user experience.

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 6, Material 6.4.7, Chrome

#### Is there anything else we should know?

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

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

Hướng nghiên cứu

Bắt đầu với bản tái hiện StackBlitz được liên kết và so sánh các thao tác với checkbox trên 100, 1.000 và 10.000 hàng, đồng thời thay đổi số lượng cột. Profile hành vi lựa chọn của mat-table để xác định nguồn gây trễ. Hoàn tất khi việc chọn từng hàng riêng lẻ và tất cả các hàng vẫn phản hồi nhanh với các bảng lớn.

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

Đánh giá

Công nghệ
angular, typescript
Lĩnh vực
frontend, performance
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/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.