Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 320870

Summary: [Viewers] With TableViewer with SWT.VIRTUAL, it is very slow to set item count to a smaller count than current one
Product: [Eclipse Project] Platform Reporter: Cédric Chabanois <cchabanois>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug
Attachments:
Description Flags
sample showing the problem none

Description Cédric Chabanois CLA 2010-07-26 03:35:47 EDT
Build Identifier: I20100608-0911

If you set the current count to 100000, it takes 0 ms but when you set it to 10000 just after, it takes 8656 ms on my computer.

The reason is that AbstractTableViewer call doGetItem(i) 90000 times in my example.

Reproducible: Always

Steps to Reproduce:
See attached sample.
Comment 1 Cédric Chabanois CLA 2010-07-26 03:36:59 EDT
Created attachment 175200 [details]
sample showing the problem
Comment 2 Hitesh CLA 2010-09-07 07:23:03 EDT
The problem is with the doGetItem(i) call required for disassociating the items. That call will actually cause the virtual tree to materialize the item at that index. So the attempt to dispose excess items will actually cause their creation. Currently SWT does not provide any API to check if a item at a particular index has been materialized or not. 

We may be already maintaining information of their state. With some changes this should be possible to fix.
Comment 3 Eclipse Webmaster CLA 2019-09-06 16:12:28 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
Comment 4 Eclipse Genie CLA 2021-10-10 05:38:43 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.