References to all grandchildren's references [message #418431] |
Tue, 15 April 2008 23:34 |
Eclipse User |
|
|
|
Originally posted by: jconlon.apache.org
Encountering performance problems trying to maintain a single viewer
that shows a list of elements referenced by multiple children in my model.
Here is the kind of structure I have in the model.
Have a root element that acts as a container for parent elements which
in turn act as a containers for child elements. The child elements
also contain references to event elements that describe the state of the
child elements.
To keep track of the state of all the child elements I have set up an
EOperation on the root to return a list of all the event elements that I
obtain by walking the tree. This Elist I use as input to the viewer.
Because of the kludgy way I am creating the Elist of events I am forced
to use an EContentAdapter and do a refresh on the viewer when new
Events are created or changed.
I think this is broken in a couple of ways.
Is there a way to create a 1 to N reference that will reference all the
Event element instances in all the Child element containers?
thanks for any ideas,
John Conlon
|
|
|
|
Re: References to all grandchildren's references [message #418434 is a reply to message #418433] |
Wed, 16 April 2008 00:44 |
Eclipse User |
|
|
|
Originally posted by: jconlon.apache.org
Ed,
Ed Merks wrote:
> John,
>
> Comments below.
>
> John E. Conlon wrote:
>> Encountering performance problems trying to maintain a single viewer
>> that shows a list of elements referenced by multiple children in my
>> model.
> What kind of performance problems? How big are these things?
High CPU utilization as the document grows larger than 2000 events. At
three thousand events things start to crawl. Was hoping to get to 20
thousand Event elements. Anything larger I may have to start looking at CDO.
>>
>> Here is the kind of structure I have in the model.
>>
>> Have a root element that acts as a container for parent elements which
>> in turn act as a containers for child elements. The child elements
>> also contain references to event elements that describe the state of
>> the child elements.
>>
>> To keep track of the state of all the child elements I have set up an
>> EOperation on the root to return a list of all the event elements that
>> I obtain by walking the tree. This Elist I use as input to the
>> viewer. Because of the kludgy way I am creating the Elist of events I
>> am forced to use an EContentAdapter and do a refresh on the viewer
>> when new Events are created or changed.
> I imagine you could know when events are added to the child and
> literally use use information to update the "derived" list. I suppose
> knowing where to adding the events into the derived list might be tricky.
My viewer is just a table viewer and I will not be doing many removals.
Just adding an element to an ArrayList will puts it at the end. I
suspect that will work.
>>
>> I think this is broken in a couple of ways.
> It's like Shakespeare. Let me count the way. :-P
>>
>> Is there a way to create a 1 to N reference that will reference all
>> the Event element instances in all the Child element containers?
> I suppose the tricky thing is to convert notifications on the child ->
> event reference into a notification on the composed list.
Yes, that was a thought as well. Just wanted to see if there was a more
elegant approach to do it.
>>
>> thanks for any ideas,
> Could you use the notifications on the children when events are added an
> removed for that child to keep up-to-date a composed list, that in turn
> generates notifications as it's updated? After all, tree viewers have
> methods like add and remove to indicate something has been added or
> removed from a given node...
Yep, I think that is the route. With a tableViewer I can use add and
remove as well.
thanks for the feedback Ed,
John
|
|
|
Powered by
FUDForum. Page generated in 0.03578 seconds