| Clearing cached elements in virtual table [message #657302] |
Wed, 02 March 2011 06:20  |
manasa Messages: 32 Registered: October 2010 |
Member |
|
|
Hi,
I am making use of a virtual table to hold and display a huge result set which is around 7lacs.
And later I try to reset the table to its initial state releasing the 7lac result set using the following code.
tv.getTable().clearAll();
tv.getTable().setItemCount(0);
Ideally setItemCount() should clear the existing cache, as it is setting the cache size to 0.
But I still see the cachedelements holding the huge resultset resulting in performance issues.
Could any clarify how to clear the cached elements in a virtual table.
Thanks in advance,
Regards,
Manasa
[Updated on: Wed, 02 March 2011 06:45] Report message to a moderator
|
|
|
| Re: Clearing cached elements in virtual table [message #657667 is a reply to message #657302] |
Thu, 03 March 2011 10:38  |
Grant Gayed Messages: 2131 Registered: July 2009 |
Senior Member |
|
|
Hi Manasa,
Table.clearAll() is the correct way to do this at the swt level. To verify
that this is working in your environment you can take
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org. eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet144 .java
and add a block like the one below that calls clearAll(), then see that the
SetData listener starts being invoked again on items already shown.
table.addListener(SWT.MouseDoubleClick, new Listener() {
public void handleEvent(Event event) {
table.clearAll();
System.out.println("CLEAR ALL!");
}
});
I don't know the jface level too well, but since you're using TableViewer on
top of Table, maybe this needs to be done at the TableViewer level instead?
Does
http://dev.eclipse.org/viewcvs/viewvc.cgi/org.eclipse.jface. snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippe ts/viewers/Snippet030VirtualLazyTableViewer.java?revision=1. 2&view=markup
give any useful clues?
Grant
"manasa" <manasa.priya.c@sap.com> wrote in message
news:ikl8oo$n3v$1@news.eclipse.org...
> Hi,
>
> I am making use of a virtual table to hold and display a huge result set
> which is around 7lacs.
> And later I try to reset the table to its initial state releasing the 7lac
> result set using the following code.
>
>
> tv.getTable().clearAll();
> tv.getTable().setItemCount(0);
>
>
> Ideally setItemCount() should clear the existing cache, as it is setting
> the cache size to 0.
> But I still see the cachedelements holding the huge resultset resulting in
> performance issues.
>
> Could any clarify how to clear the cached elements in a virtual table.
> Thanks in advance,
>
> Regards,
> Manasa
|
|
|
Powered by
FUDForum. Page generated in 0.01427 seconds