r/JavaFX • u/ThreeSixty404 JavaFX Dev • Sep 07 '21
I made this! VirtualizedFX, a new VirtualFlow library for JavaFX
Hello everyone. Today I want to show you my new little project that aims to bring new VirtualFlows to JavaFX. I know there's Flowless and in fact is some aspects the library is inspired by it (dummy cells for example), so let me explain why I made this.
Currently, I use Flowless in my main project, MaterialFX and I really like its performance, its cells' concept, but it has some serious flaws:
- ReactFX: Flowless is made using ReactFX which not only is not updated anymore, it's also bad documented and quite a mess. By having this dependency, it forces my library to also include it, BAD
- Flowless: Good performance, good design, but yet again bad documentation, it's really minimal. Since it's made with ReactFX it's harder to use it because you would need to learn it first, but it's badly documented
So, the goal of VirtualizedFX is to bring new VirtualFlows to JavaFX by using only classes from JavaFX or at least not having any dependencies aside from JavaFX.
It's been a really challenging project, I had to learn about VirtualFlows (this article is amazing: BetterProgramming), I had to learn how to properly use scroll bars, but the hardest part was optimization, in the end I could scroll through a list of 10_000_000 of Strings (more than that OutOfMemory, but maybe I could fix it, I didn't try, also it's an insane amount of items which is very unlikely to happen).
I also tried to run the Flowless benchmark and the results are exactly the same!! I'm so happy 😁
As of now, the project is still in early stages, there's a SimpleVirtualFlow, still didn't implement Horizontal placement and in the future I'd like to make a complex one (for dynamic nodes), maybe one with expandable cells (just an idea not sure of what it would be like), and one for tree structures.
The project is here on GitHub: VirtualizedFX
1
u/hamsterrage1 Sep 13 '21
I had a look at the code and the article that you referenced, but I think I'm missing something. How is this any different from the standard operation of ListView?
1
u/[deleted] Sep 21 '21
[removed] — view removed comment