List box reliability fixes [release]

This commit is contained in:
crschnick
2025-03-18 10:02:51 +00:00
parent a130bcfa91
commit 7b9afaef08
3 changed files with 27 additions and 15 deletions
@@ -26,6 +26,7 @@ import javafx.scene.layout.VBox;
import lombok.Setter;
import java.util.*;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.Function;
public class ListBoxViewComp<T> extends Comp<CompStructure<ScrollPane>> {
@@ -60,10 +61,23 @@ public class ListBoxViewComp<T> extends Comp<CompStructure<ScrollPane>> {
vbox.setFocusTraversable(false);
var scroll = new ScrollPane(vbox);
refresh(scroll, vbox, shown, all, cache, false, false);
refresh(scroll, vbox, shown, all, cache, false);
var hadScene = new AtomicBoolean(false);
scroll.sceneProperty().subscribe(scene -> {
if (scene != null) {
hadScene.set(true);
}
});
shown.addListener((ListChangeListener<? super T>) (c) -> {
refresh(scroll, vbox, c.getList(), all, cache, true, true);
Platform.runLater(() -> {
if (scroll.getScene() == null && hadScene.get()) {
return;
}
refresh(scroll, vbox, c.getList(), all, cache, true);
});
});
if (scrollBar) {
@@ -228,7 +242,6 @@ public class ListBoxViewComp<T> extends Comp<CompStructure<ScrollPane>> {
List<? extends T> shown,
List<? extends T> all,
Map<T, Region> cache,
boolean asynchronous,
boolean refreshVisibilities) {
Runnable update = () -> {
synchronized (cache) {
@@ -244,10 +257,6 @@ public class ListBoxViewComp<T> extends Comp<CompStructure<ScrollPane>> {
var shownCopy = new ArrayList<>(shown);
var newShown = shownCopy.stream()
.map(v -> {
if (asynchronous && scroll.getScene() == null) {
return null;
}
if (!cache.containsKey(v)) {
var comp = compFunction.apply(v);
if (comp != null) {
@@ -284,11 +293,6 @@ public class ListBoxViewComp<T> extends Comp<CompStructure<ScrollPane>> {
updateVisibilities(scroll, listView);
}
};
if (asynchronous) {
Platform.runLater(update);
} else {
PlatformThread.runLaterIfNeeded(update);
}
update.run();
}
}
+9 -1
View File
@@ -1,5 +1,13 @@
## Performance
A severe performance regression was accidentally introduced in the recent 15.4 release. This release fixes this issue, so you will get much better performance in this version. It is recommended that you upgrade to 15.7.
While investigating, there were also a few other performance issues discovered that will be addressed in one of the next releases.
## Changes
- Add support for Warp on Windows and Linux
- Fix right part of file browser becoming blocked after a split tab is merged again
- Fix right part of file browser becoming blocked after a tab is split
- Fix tailscale refresh operations failing with an out-of-bounds error in some cases
- Fix vmware .vmx failing to load if they had an unknown encoding
- Fix some translations
+1 -1
View File
@@ -1 +1 @@
15.7-3
15.7