JavaFx TableView - ScrollTo is taking long time

30 views
Skip to first unread message

stsi...@gmail.com

unread,
Sep 20, 2016, 11:18:00 AM9/20/16
to JavaFXAndroid
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

Reply all
Reply to author
Forward
0 new messages