[GTK] problematic runtime behavior in table when deleting many rows
Maintainer thường phản hồi trong vòng 1 ngày
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
- 55/100
Hướng nghiên cứu
Start by reproducing the hang with the supplied GTK3 Java snippet: create a multi-select virtual table, select a row that will be removed, then shrink its item count from 50,000 to 5. Compare the timing with only the first row selected and trace the GTK table item-count and selection-removal paths. Done means shrinking rows intersecting the selection is comparably fast and the behavior is covered by a regression test.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
On GTK3, deleting many rows from a table results in a hang if
- SWT_MULTI is set
- the rows to be deleted intersect with the selection of the table
- the number of rows to be deleted is relatively large
Snippet:
import org.eclipse.swt.*;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;
public class GtkTablePerformanceIssue {
private static final int HUGE_COUNT = 500_000;
private static final int LARGE_COUNT = 50_000;
private static final int SMALL_COUNT = 5;
public static void main(String[] args) {
final Display display = new Display();
final Shell shell = new Shell(display);
shell.setText("GTK Table remove performance");
shell.setLayout(new GridLayout(1, false));
final Table table = new Table(shell, SWT.VIRTUAL | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION);
table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
table.addListener(SWT.SetData, event -> {
final TableItem item = (TableItem)event.item;
item.setText("Item " + table.indexOf(item));
});
final Label explanation = new Label(shell, SWT.NONE);
explanation.setText("When shrinking, select a row which won't exist after the shrink.");
final Button huge = new Button(shell, SWT.PUSH);
huge.setText("Reset to " + HUGE_COUNT + " rows");
huge.addListener(SWT.Selection, event -> table.setItemCount(HUGE_COUNT));
final Button large = new Button(shell, SWT.PUSH);
large.setText("Reset to " + LARGE_COUNT + " rows");
large.addListener(SWT.Selection, event -> table.setItemCount(LARGE_COUNT));
final Button shrink = new Button(shell, SWT.PUSH);
shrink.setText("Shrink to " + SMALL_COUNT + " rows");
final Label result = new Label(shell, SWT.NONE);
result.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
shrink.addListener(SWT.Selection, event -> {
final long start = System.nanoTime();
table.setItemCount(SMALL_COUNT);
final long elapsedMillis = (System.nanoTime() - start) / 1_000_000;
result.setText("setItemCount(" + SMALL_COUNT + "): " + elapsedMillis + " ms");
result.getParent().layout();
});
table.setItemCount(LARGE_COUNT);
table.select(8);
shell.setSize(500, 400);
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
display.dispose();
}
}
Expected behavior
The entries should be removed as fast as they are when only the first row is selected.
- Ngôn ngữ chính
- Java
- Star
- 202
- Fork
- 206
- Merge trung bình
- 14 giờ 7 phút
- Pull request đã merge (30 ngày)
- 103
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của eclipse-platform/eclipse.platform.swt
-
`SWT_AWT.initFrame` takes `(long, String)` in Java; the GTK native declares no `className` and the Cocoa native types it `const char *`Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
eclipse-platform/eclipse.platform.swt#3665 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
eclipse-platform/eclipse.platform.swt#3546 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
eclipse-platform/eclipse.platform.swt#3428 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 75/100
eclipse-platform/eclipse.platform.swt#3336 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
eclipse-platform/eclipse.platform.swt#3718 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của eclipse-platform/eclipse.platform.swt
Issue tương tự
-
Flight SQL JDBC parses boolean properties case-sensitively, silently disabling TLS for useEncryption=TRUECó thể đã có người làm @Arawoof06 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
apache/arrow-java#1357 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
apache/rocketmq-dashboard#6610 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
MetricsHub/metricshub-community#1396 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
L: java:gradle L: java:maven L: ruby:bundler T: bug 🐞
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
dependabot/dependabot-core#16547 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Citationcount column sorts alphabetically instead of numericallyCó thể đã có người làm @kpunia306 đã nhận hôm nay. Đang mởstatus: needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
JabRef/jabref#17459 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày