Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Performance issue which large number of columns(The overidden getConfigLabelsByPosition function takes too long to complete)
Performance issue which large number of columns [message #1597552] Mon, 02 February 2015 11:27 Go to next message
Brian Lobo is currently offline Brian LoboFriend
Messages: 8
Registered: September 2014
Junior Member
I have a nattable in my swt dialog that has around 45 columns . of which I can view 24 columns at a time based on my column sizings. Having a composite above my nattable I can see maximum three rows of nattable . In this case when I hit any button which eventually launches a progress bar dialog , things work fine and fast . but if I hide my top composite then I get to view 15 rows of nattable. In this case if I hit my buttons the progress bar dialog takes substantial time to start and if repeatedly hit the button the delay increases also if left idle the delay shoots up further. I have observed that getConfigLabelsByPosition which is overriddent to apply various labels (for combo , making non editiable , restricting only double entry etc) is taking time to finish processing all the cells when larger number of rows are visible . Since my ui thread that displays the progress bar waits for nattable to finish rendering , the whole process gets delayed , i would like to know the following
1. Is there a performance related bug out here ( I am using nattable 1.1.0)
2. Can I prevent getConfigLabelsByPosition from being called based on any condition
Re: Performance issue which large number of columns [message #1597645 is a reply to message #1597552] Mon, 02 February 2015 12:52 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2803
Registered: July 2012
Senior Member
For both questions no.

getConfigLabelsByPosition() is called for every visible cell to determine the state. And it was never an issue with this, unless you are doing time consuming actions to determine stuff. If the number of visible rows or columns has impact on the performance, it sounds like you are doing something that iterates over the visible rows/columns.

Also one thing I read quite often is that people are overriding getConfigLabelsByPosition(). I don't understand why! In NatTable we have the concept of IConfigLabelAccumulators. This documented for a long time within the NatTable documentation https://www.eclipse.org/nattable/documentation.php?page=styling.

A much more detailed description on that topic can be found in the Getting Started Tutorial I published a few weeks ago: http://www.vogella.com/tutorials/NatTable/article.html#architecture_labels

So, IMHO you should check your implementation and see if there is the performance leak. I created tables that showed much more rows and columns at one with quite a lot labels and never faced performance issues at such a basic function.
Re: Performance issue which large number of columns [message #1604103 is a reply to message #1597645] Fri, 06 February 2015 16:39 Go to previous messageGo to next message
Brian Lobo is currently offline Brian LoboFriend
Messages: 8
Registered: September 2014
Junior Member
I just got to know that since I used TextPainter Constructor with three parameters (TextPainter (true,true,5,true) so that my multiline Text can be seen proper as it does an auto row sizing . I suppose this makes much more calls to getConfigLabelsByPosition and hence I see a performance issue , If I change the code and use a two parameter TextPainter (TextPainter(true,true)) then I dont see the performance issue . Could you help me find a mid way where I still can do an auto row height sizing and not lose on performance .
Re: Performance issue which large number of columns [message #1604178 is a reply to message #1604103] Fri, 06 February 2015 17:41 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2803
Registered: July 2012
Senior Member
You could try to only enable auto row resizing and not column auto resizing aswell.

Also I'm still not sure if the performance loss is caused by retrieving the config labels. Despite you are doing time consuming stuff there.

The auto row resizing performs a resize which triggers repainting.
Previous Topic:File Format and extension don't match error
Next Topic:Understanding Nattable internal calls
Goto Forum:
  


Current Time: Fri Feb 26 10:57:56 GMT 2021

Powered by FUDForum. Page generated in 0.01904 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top