Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Real time updates in Virtual Table
Real time updates in Virtual Table [message #458545] Fri, 15 July 2005 11:18 Go to next message
Bruce Skingle is currently offline Bruce SkingleFriend
Messages: 7
Registered: July 2009
Junior Member
I am writing an application which displays potentially large amounts of data
in a virtual table. Some of the values may change asynchronously and when
this happens I need to update the display.

If I call Table.clear(int row) for each row when any column is updated then
everything works, but the display flickers as, if the row being updated is
on the screen it is blanked out before my SetData event handler gets called
which paints in the new values (via TableItem.setText()). (Since only some
of the columns change, this causes other columns to be blanked and then
redrawn with the same value, making the flickering more obvious).

As an alternative I can call TableItem.setText() each time a value changes.
This fixes the flickering and works fine for a 1000 row table, however, with
a 400,000 row table (which performs fine with the Table.clear() method
above), the machine grinds to a halt. Obviously I'm forcing the creation of
non-virtual TableItems via the update, which the SetData event handler has
never asked for.

The solution would seem to be to call TableItem.setText() if the item is
on-screen, or Table.clear() if it is not, but I cannot see any efficient way
to do this. (I have considered calling Table.getTopIndex() and
Table.getItemHeight() to work out which rows might be on the screen, but
this seems like a lot to be doing in a handler which currently can process
10,000 updates per second).

TableItem seems to have a (package private) field called cached, which might
be just what I need, but I can't access it.

I might be missing something (in which case any clues would be most
appreciated), but I think that either Table needs a method like clear(int
row) which invalidates the cached value and forces the SetData handler to be
called again if the row is visible, but without clearing the row, or;
TableItem needs a method to tell you if it's virtual, although the
usefulness of this depends on when a virtual table discards cached rows as
you scroll over a large data set.

If anyone has any suggestions I would be most grateful.

Bruce.
Re: Real time updates in Virtual Table [message #458742 is a reply to message #458545] Wed, 20 July 2005 13:47 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
https://bugs.eclipse.org/bugs/show_bug.cgi?id=92313

Fixed > 20050720

The flash should be gone. Try it now and let me know how you get on.

"Bruce Skingle" <Bruce.Skingle@jpmorgan.com> wrote in message
news:db863c$v8s$1@news.eclipse.org...
> I am writing an application which displays potentially large amounts of
data
> in a virtual table. Some of the values may change asynchronously and when
> this happens I need to update the display.
>
> If I call Table.clear(int row) for each row when any column is updated
then
> everything works, but the display flickers as, if the row being updated is
> on the screen it is blanked out before my SetData event handler gets
called
> which paints in the new values (via TableItem.setText()). (Since only some
> of the columns change, this causes other columns to be blanked and then
> redrawn with the same value, making the flickering more obvious).
>
> As an alternative I can call TableItem.setText() each time a value
changes.
> This fixes the flickering and works fine for a 1000 row table, however,
with
> a 400,000 row table (which performs fine with the Table.clear() method
> above), the machine grinds to a halt. Obviously I'm forcing the creation
of
> non-virtual TableItems via the update, which the SetData event handler has
> never asked for.
>
> The solution would seem to be to call TableItem.setText() if the item is
> on-screen, or Table.clear() if it is not, but I cannot see any efficient
way
> to do this. (I have considered calling Table.getTopIndex() and
> Table.getItemHeight() to work out which rows might be on the screen, but
> this seems like a lot to be doing in a handler which currently can process
> 10,000 updates per second).
>
> TableItem seems to have a (package private) field called cached, which
might
> be just what I need, but I can't access it.
>
> I might be missing something (in which case any clues would be most
> appreciated), but I think that either Table needs a method like clear(int
> row) which invalidates the cached value and forces the SetData handler to
be
> called again if the row is visible, but without clearing the row, or;
> TableItem needs a method to tell you if it's virtual, although the
> usefulness of this depends on when a virtual table discards cached rows as
> you scroll over a large data set.
>
> If anyone has any suggestions I would be most grateful.
>
> Bruce.
>
>
Previous Topic:Widget is disposed!!!
Next Topic:need PropertyGrid control
Goto Forum:
  


Current Time: Fri Apr 19 08:46:53 GMT 2024

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

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

Back to the top