Community
Participate
Working Groups
While disposing of a table, all TableItems and TableColumns are disposed of one by one. This causes many unnecessary re calculation of scoll bar sizes, topIndex, focusIndex, etc. This should be avoided. Also check the Tree if a similar optimization can be applied there.
Created attachment 193561 [details] Proposed patch This patch skips the code executed in Table#destroyItem and Table#destroyColumn if Table is in dispose. The corresponding item and column are removed from its holder in Table#releaseChildren. Do I miss something?
Just checked the Tree and the same optimization could be made for it too.
Created attachment 193579 [details] Activated test case The Table_Test#testDisposeWithFontDisposeInDisposeListener() was without effect as it wasn't executing the PROCESS_ACTION phase. This patch includes the previous and fakes the phase in the test accordingly. With this, we even have a test case for the changes. From my point of view, the patch can be committed.
Applied patch to CVS HEAD. Will be made the same optimization for Tree as well.
Similar optimization for Tree is in CVS.