uitable scroll behaves very slow ...

조회 수: 14 (최근 30일)
SSOI SS
SSOI SS 2012년 1월 15일
Hi, I am creating a GUI with uitable. In this table there should be more than 30000 items of strings display. I just notice that if I put so many elements into uitable's data, the synchronisation of display by scrolling with the vertical scroll bar is not good. Sometime if I draw the bar little bit far away from the current location, it takes more than several or even ten seconds until the content is showed.
Does anyone have a idea how to improve this? Thank you very much .

채택된 답변

Yair Altman
Yair Altman 2012년 1월 20일
Matlab's uitable is very inefficient in its handling of data: each cell element is a separate object that needs to be separately created and rendered. This causes the initial data load and scrolling to become extremely slow if you have more than a few hundred/thousand cells in your table.
I've found a way to significantly reduce this overhead in uitable, and I plan to post this as an article in http://UndocumentedMatlab.com sometime in the upcoming month or two. This will make uitable much faster, but there is still an inherent slowdown when there is an enormous number of cells.
Instead of using uitable, if you use a simpler JTable or JideTable or my createTable (which is basically just a Matlab wrapper for a basic Java table), then the responsiveness improves significantly.
Or you can wait for Mathworks to improve uitable in some future Matlab release...
Yair Altman

추가 답변 (1개)

Jan
Jan 2012년 1월 15일
It is not a good idea to keep 30'000 strings in a uitable. Split the list into some smaller parts, e.g. starting with a specific character or similar.
A GUI should allow an intuitive usage of the controls. As long as the scrollbar has less than 30'000 pixels, it will not be user-friendly. Therefore I'm convinced, there must be a better approach.
  댓글 수: 2
SSOI SS
SSOI SS 2012년 1월 16일
I know it is difficult for user to scroll within 30000 strings ... but this window is just a place to show the filter results and the user has his right to use the scroll bar .... so I don't think this is a problem of whether the design is good or not. Later I tried a solution based on Java jTable, it works very well and the table reacts to every movement of scroll bar in time. I think Matlab can do more than what it right now can.
Walter Roberson
Walter Roberson 2012년 1월 16일
undocumentedmatlab.com

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by