Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » TableViewer blank lines, VIRTUAL and ILazyContentProvider
TableViewer blank lines, VIRTUAL and ILazyContentProvider [message #323681] Sat, 05 January 2008 23:15 Go to next message
Eclipse UserFriend
Originally posted by: k.nospam.bugmenot.com

:( weeks trying to fix this problem.

Short: thousand elements, high update rate, blank lines in virtual table
viewer. I would really appreciate your help!, please :~(

I have a model that is feed from the network it can end having thousands
of elements and the update rate is high it could be 10 or more elements
by millisecond. And I want to show this elements in a table viewer.
First approach was to use VIRTUAL and ILazyContentProvider but soon I
needed a way to deal with the high update rate so I tried to use

jface.deferred

That seems to be incorrectly implemented, why doesn't it use the
ILazyContentProvider updateElement method to know the visible range?

I read this:


https://bugs.eclipse.org/bugs/show_bug.cgi?id=146799
(is this winXP only? I'm using gtk Ubuntu feisty)

Also I read this bad news:

http://www.eclipsezone.com/eclipse/forums/m92128222.html

And tried to get inspiration from:

http://dsdp.eclipse.org/help/latest/index.jsp?topic=/org.ecl ipse.dd.dsf.doc/docs/dsf_white_paper.html


Now I'm using a wrapper for the table viewer to do the updates in batch
with scheduled Tasks I use a thread to schedule task this thread uses
Dsiplay.syncExec to execute the scheduled task that performs the table
updates (.replace(index,element) in batch. Also I can set a rate of
500ms to update the UI and avoid flooding the ui thread with Runnables.

But I steel have the same blank line problems :(. In my
LazyContentProvider I get the request for elements from the viewer, I
schedule the updates but I steel see blank lines.

Any suggestion is appreciated, will it be possible to use a table viewer
to show network traffic?

thank you very much in advance.
Re: TableViewer blank lines, VIRTUAL and ILazyContentProvider [message #323683 is a reply to message #323681] Sun, 06 January 2008 02:17 Go to previous messageGo to next message
Snjezana Peco is currently offline Snjezana PecoFriend
Messages: 789
Registered: July 2009
Senior Member
Try to use Display.asyncExec instead of Display.syncExec

Snjeza

Kevin wrote:
> :( weeks trying to fix this problem.
>
> Short: thousand elements, high update rate, blank lines in virtual table
> viewer. I would really appreciate your help!, please :~(
>
> I have a model that is feed from the network it can end having thousands
> of elements and the update rate is high it could be 10 or more elements
> by millisecond. And I want to show this elements in a table viewer.
> First approach was to use VIRTUAL and ILazyContentProvider but soon I
> needed a way to deal with the high update rate so I tried to use
>
> jface.deferred
>
> That seems to be incorrectly implemented, why doesn't it use the
> ILazyContentProvider updateElement method to know the visible range?
>
> I read this:
>
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=146799
> (is this winXP only? I'm using gtk Ubuntu feisty)
>
> Also I read this bad news:
>
> http://www.eclipsezone.com/eclipse/forums/m92128222.html
>
> And tried to get inspiration from:
>
> http://dsdp.eclipse.org/help/latest/index.jsp?topic=/org.ecl ipse.dd.dsf.doc/docs/dsf_white_paper.html
>
>
>
> Now I'm using a wrapper for the table viewer to do the updates in batch
> with scheduled Tasks I use a thread to schedule task this thread uses
> Dsiplay.syncExec to execute the scheduled task that performs the table
> updates (.replace(index,element) in batch. Also I can set a rate of
> 500ms to update the UI and avoid flooding the ui thread with Runnables.
>
> But I steel have the same blank line problems :(. In my
> LazyContentProvider I get the request for elements from the viewer, I
> schedule the updates but I steel see blank lines.
>
> Any suggestion is appreciated, will it be possible to use a table viewer
> to show network traffic?
>
> thank you very much in advance.
Re: TableViewer blank lines, VIRTUAL and ILazyContentProvider [message #323685 is a reply to message #323683] Sun, 06 January 2008 07:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: k.nospam.bugmenot.com

Snjezana Peco wrote:
> Try to use Display.asyncExec instead of Display.syncExec
>

I'm using syncExec because I have a dedicated thread to execute the ui
updates in batches so using asyncExec doesn't make a big difference for
me. Before having the dedicated thread, of course I used asyncExec. I
could use asyncExec again but it will make my code more complex and now
I'm looking for solutions no new problems.

Thank you for your reply.
Re: TableViewer blank lines, VIRTUAL and ILazyContentProvider [message #323896 is a reply to message #323681] Fri, 11 January 2008 14:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bokowski.ca.ibm.com

Hi Kevin,

We are aware of problems with the SWT.VIRTUAL support in TableViewer but
unfortunately don't have enough resources, so it will take some time until
we can fix the issues. If your application updates the table frequently, I
would recommend using Table directly instead of TableViewer. TableViewer
works well if you are adding elements at the end of the table, but updates
at other places, or updates that also touch the current selection, may lead
to problems.

We would be happy if someone could help us out on this. See
http://wiki.eclipse.org/Platform_UI/How_to_Contribute, and feel free to
contact me if you think you could help us fix some of the problems. I could
also point you to existing bug reports in bugzilla.

Boris

"Kevin" <k@nospam.bugmenot.com> wrote in message
news:flovdl$4tg$1@build.eclipse.org...
> :( weeks trying to fix this problem.
>
> Short: thousand elements, high update rate, blank lines in virtual table
> viewer. I would really appreciate your help!, please :~(
>
> I have a model that is feed from the network it can end having thousands
> of elements and the update rate is high it could be 10 or more elements by
> millisecond. And I want to show this elements in a table viewer. First
> approach was to use VIRTUAL and ILazyContentProvider but soon I needed a
> way to deal with the high update rate so I tried to use
>
> jface.deferred
>
> That seems to be incorrectly implemented, why doesn't it use the
> ILazyContentProvider updateElement method to know the visible range?
>
> I read this:
>
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=146799
> (is this winXP only? I'm using gtk Ubuntu feisty)
>
> Also I read this bad news:
>
> http://www.eclipsezone.com/eclipse/forums/m92128222.html
>
> And tried to get inspiration from:
>
> http://dsdp.eclipse.org/help/latest/index.jsp?topic=/org.ecl ipse.dd.dsf.doc/docs/dsf_white_paper.html
>
>
> Now I'm using a wrapper for the table viewer to do the updates in batch
> with scheduled Tasks I use a thread to schedule task this thread uses
> Dsiplay.syncExec to execute the scheduled task that performs the table
> updates (.replace(index,element) in batch. Also I can set a rate of 500ms
> to update the UI and avoid flooding the ui thread with Runnables.
>
> But I steel have the same blank line problems :(. In my
> LazyContentProvider I get the request for elements from the viewer, I
> schedule the updates but I steel see blank lines.
>
> Any suggestion is appreciated, will it be possible to use a table viewer
> to show network traffic?
>
> thank you very much in advance.
Re: TableViewer blank lines, VIRTUAL and ILazyContentProvider [message #323958 is a reply to message #323896] Mon, 14 January 2008 19:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: k.nospam.bugmenot.com

Ok, thank you for your reply.
I'm still testing my solution and is very specific to the problems I
have. I read the code of BackgroundContentProvider and the
LazySortedCollection and other jface.deferred classes. There are good
ideas in that code but I can't use it. I would like to contribute,
but first I need to finish my work.
The problem I would like to solve for jface is simple: making easy to
use viewers with ten of thousand items and high frequency updates.

To do this I started using VIRTUAL and LazyContentProvider, but then I
have to implement: update of the ui in batches, not blocking the content
provider thread, sorting and filtering.
I will contact you when I have time to start working on this.

I know that IBM uses RCP for their projects, do they use jface? do they
have their own solutions for this things? I googled and found some
javadoc of ibm.com that was related to this problems but couldn't find
the source code but from the javadoc descriptions it was like an
alternative jface framework.
Re: TableViewer blank lines, VIRTUAL and ILazyContentProvider [message #324128 is a reply to message #323958] Thu, 17 January 2008 18:40 Go to previous message
Eclipse UserFriend
Originally posted by: bokowski.ca.ibm.com

> I know that IBM uses RCP for their projects, do they use jface? do they
> have their own solutions for this things? I googled and found some javadoc
> of ibm.com that was related to this problems but couldn't find the source
> code but from the javadoc descriptions it was like an alternative jface
> framework.

Yes, IBM uses Eclipse, RCP, JFace and all that in their products. I am not
aware of an alternative JFace framework, but I would be happy for any
contributions, whether they come from IBM or not. ;-)
Previous Topic:Editor model contained in EditorInput or EditorPart?
Next Topic:Headless build, automated Junit tests and code coverage
Goto Forum:
  


Current Time: Mon Dec 30 16:34:20 GMT 2024

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

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

Back to the top