Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JavaFx TableView - ScrollTo is taking long time  RSS feed

tsiva raaj
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Team,
I am loading 3L records in table using JavaFx TableView concept. I could figure out some performance issue when apply the scrollTo().
Initially I tried VirtualFlow -> scrollToOffset() and taking more time. Then I tried VirtualFlow -> scrollTo(). This is comparitively giving better
performance. But, even scrollTo() is taking 10 seconds to load the page.
I red in forum, scrollTo() is taking less time than scrollToOffset() but not exact position. This is fine.

My requirement is, need to focus last scroll position(swith from one page to another page). Please give me a hint to resolve this issue.
I need to achieve the scroll position as well as better performance.

JRE Version - 1.8
JavaFx Jar - jfxrt.jar (Taking from JRE Version 1.8)

My Code...

TableView<TYPE> m_tableView = new TableView<TYPE>();
m_tableView.layout(); // Always taking 15 seconds
TableViewSkin<?> tableskin = (TableViewSkin<?>) m_tableView.getSkin();
VirtualFlow virtualFlow = (VirtualFlow) tableskin.getChildren().get(1);
//virtualFlow.scrollToOffset(50000); // Taking 50 seconds to load the page
virtualFlow.scrollTo(50000); // Taking 10 seconds to load the page
Dave Tolls
Posts: 2909
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!