UITable data display performance issue

I have a uitable created in appdesigner and loaded with data from an SQL database. Displaying any amount of data, even as few as 100 rows and 8 columns results in very poor performance. Scrolling up and down takes on the order of seconds to render new rows of the table. Is there any way to improve the performance of the UITable display to the end user?
Please note that the data within the table is not large, mainly datetime values, integer values and short text strings with less than 10 characters.
Code for loading UITable:
tmpName = tmpTable.Properties.VariableNames;
tmpTable.StartDate = datetime(tmpTable.StartDate, 'Format', 'uuuu-MM-dd HH:mm:ss.SSSSSS');
tmpTable.EndDate = datetime(tmpTable.EndDate, 'Format', 'uuuu-MM-dd HH:mm:ss.SSSSSS');
tmpTable.StartDate.Format = 'uuuu/MM/dd HH:mm:ss'
tmpTable.EndDate.Format = 'uuuu/MM/dd HH:mm:ss'
app.DataTable.ColumnName = tmpName(1:8);
app.DataTable.Data = tmpTable(1:100,1:8);
app.DataTable.ColumnEditable = true;

回答(1 个)

F3-MSF
F3-MSF 2018-8-29
编辑:F3-MSF 2018-8-29
I have a similar problem with tables of 100's of rows that cannot be reduced. All the research I've done indicates that the Matlab uitable implementation handles each cell an individual class object. This gets very slow with more than a few dozen rows of data, and there's just not much to do about it until Mathworks decides to make the code more efficient.
It's possible to use an older version of uitable (pass 'v0' as an argument) that is ~10x faster, but that's long since deprecated and doesn't contain most of the new useful functionality of the modern uitable.

6 个评论

Have you managed to find any solution to this?
I contacted Mathworks and was informed that they are aware of the issue and it will/may be addressed in a later release.
"Have you managed to find any solution to this?"
Judging from my own communications with Mathworks support and the age of similar complaints online, I wouldn't hold my breath.
Our solution has been to migrate our tool to R/Shiny.
I have the same issue. Has this issue been fixed? I need to export data to excel to do any kind of analysis as App designer's table is not useable at all for anykind of table data analysis.
They still didn't fix. I have the same problem too still.
Same issue here. Does anybody have a solution to this?
I just noticed in the profiler that updating some values in a uitable is by far the slowest task in my code.

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息

产品

版本

R2018a

提问:

2018-7-17

Community Treasure Hunt

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

Start Hunting!

Translated by