Re: Re: Generating an update event externally

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Re: Re: Generating an update event externally

James Lemieux
Your best bet would be syncing your EventList to a Map and writing through the map into your EventList pipeline.

See <a href="https://svn.java.net/svn/glazedlists~svn/tags/glazedlists-1_9_0/www/api/ca/odell/glazedlists/GlazedLists.html#syncEventListToMap(ca.odell.glazedlists.EventList, ca.odell.glazedlists.FunctionList.Function)">syncEventListToMap() for details.

This assumes that you can get some sort of stable key.

On Wed, Jun 3, 2015 at 2:38 PM, <[hidden email]> wrote:
Hey James et al,

In general, having a kick/nudge list as part of GL would be nice -- at
this point GL is not covering the situation when the EL does not change
but value returned by TF.getColumnValue(T element, int idx) has
to...basically a cell update as opposed to a row change.

Closer to home, I am having performance issues when dispatching the
kick/nudge event.

In order to kick/nudge a set of elements, I need to know their indices,
because ListEventAssembler.elementUpdated() method requires an element
index...Out of the box I can only do this.indexOf(element), which
performs a liner search, and given I have over 60K of elements and have
to nudge every second (market data sub ticks at that rate), this ends
up being quite costly.

Is there a GL workaround for finding an event list's element's index in
a way better than O(N) or do I have to create an external structure to
track indices...

The list will be added to a lot (new order rows), so new indices will
be tacked on at the bottom...

Let me know what you guys think.

Best regards,