On Sun, 11 Jan 2026 17:01:32 GMT, youngledo <[email protected]> wrote:

> The commit 1b12c8a490 introduced two performance issues in VirtualFlow:
> 
> 1. Calling requestLayout() on all cells in the pile on every layout pass This 
> causes unnecessary layout calculations for 50-100 recycled cells per frame 
> during scrolling.
> 
> 2. Using sheetChildren.removeAll(pile) which has O(n*m) time complexity This 
> becomes extremely slow with large cell pools.
> 
> These changes caused severe scrolling lag in ListView/TableView with many 
> items (e.g., 100+ items, even less). The fix removes both problematic code 
> blocks while preserving the getViewportBreadth() visibility change needed by 
> TableRowSkinBase.
> 
> Tested with ListView containing 1000 items - scrolling is now smooth again, 
> matching JavaFX 24 performance.
> 
> The sample project has been uploaded:
> [demo-javafx.zip](https://github.com/user-attachments/files/24561207/demo-javafx.zip)
> 
> My system environment is:
> - Apple M1
> - macOS 26.2
> 
> Installed and used JDKs from the following vendors via SDKMAN:
> - 25.0.1-graalce
> - 25.0.1.fx-nik
> - 25.0.1-tem
> 
> Without exception, the lists are all somewhat laggy when scrolling. But if I 
> downgrade the FX version to 24, only "25.0.1.fx-nik" still shows lag — the 
> other two are very smooth!
> 
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0";
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
>          http://maven.apache.org/xsd/maven-4.0.0.xsd";>
>     <modelVersion>4.0.0</modelVersion>
> 
>     <groupId>com.example</groupId>
>     <artifactId>demo-javafx</artifactId>
>     <version>1.0-SNAPSHOT</version>
>     <packaging>jar</packaging>
> 
>     <name>JavaFX ListView Demo</name>
> 
>     <properties>
>         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>         <java.version>25</java.version>
>         <javafx.version>25</javafx.version>
>         <javafx.maven.plugin.version>0.0.8</javafx.maven.plugin.version>
>     </properties>
> 
>     <dependencies>
>         
>         <dependency>
>             <groupId>org.openjfx</groupId>
>             <artifactId>javafx-controls</artifactId>
>             <version>${javafx.version}</version>
>         </dependency>
> 
>         
>         <dependency>
>             <groupId>org.openjfx</groupId>
>             <artifactId>javafx-fxml</artifactId>
>             <version>${javafx.version}</version>
>         </dependency>
>     </dependencies>
> 
>     <build>
>         <plugins>
>             
>             <plugin>
>                 <groupId>org.apache.maven.plugins</g...

This pull request has been closed without being integrated.

-------------

PR: https://git.openjdk.org/jfx/pull/2030

Reply via email to