Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JavaFx TableView - ScrollTo is taking long time  RSS feed

 
tsiva raaj
Greenhorn
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.getStyleClass().add("DataGrid-Table");
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
Ranch Hand
Posts: 2554
27
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!