Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting a custom Column Width on a table makes rendering much slower #9556

Open
sambu16 opened this issue Aug 3, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@sambu16
Copy link

commented Aug 3, 2018

Calling setColumnWidth on a tableColumnModel makes the rendering of the table very slow. I have a table on a tabview and this the switch between tabs is taking ~6 seconds. If I remove the setting of the column width then performance is restored. I presume I can edit a default columnWidth somewhere which I'll look into, but setting it this way shouldn't cause such bad performance.

I created a playground version that's not as poor performance as my actual app, but does demonstrate the performance decrease when switching from Tab1 to Tab2 vs the performance of switching from Tab2 to Tab1.

http://tinyurl.com/y8m5djmq

@derrell

This comment has been minimized.

Copy link
Member

commented Aug 3, 2018

The Table widget is notoriously bad about handling large numbers of columns. One major problem you're seeing here is that for each column width change, scroller widths and scroll bar visibility are being calculated: qx.ui.table.columnModel.Basic's setColumnWidth fires event widthChanged which invokes qx.ui.table.Table's _onColWidthChanged method, which updates scroller widths and scroll bar visibility. There is lots of room for deferred processing, that this widget doesn't do. It's one of the very old qooxdoo widgets, and although it's great for many things, it has severe limitations. You're hitting on one of them.

What I don't understand is why the rendering is slow upon subsequent tab changes. Those event listeners should only be called during table creation. There's more to this than meets the eye...

If all or most of your columns are the same size, you can change the default column width with
qx.ui.table.columnmodel.Basic.DEFAULT_WIDTH = 120;

@sambu16

This comment has been minimized.

Copy link
Author

commented Aug 4, 2018

Thanks for the tip, this'll work nicely because it is only to make the default bigger for a specific table so I'll set it, build the table and set it back again so I don't change the default anywhere else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.