Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Reduce the number of Adapters created in EMF databinding
Reduce the number of Adapters created in EMF databinding [message #1316785] Sat, 26 April 2014 18:53 Go to next message
Xavipen Mising name is currently offline Xavipen Mising nameFriend
Messages: 59
Registered: March 2011
Member
Hi,

I have started looking into detail to the EMF databinding framework. It is quite good, although i have one question.

If i have an EObject with 4 EAttributes i would like to make a binding to Text. I always end up with 4 new Adapters added to the EObject. In othe words, i end up with one new adapter added to the EObject per attribute i am binding.

I was wondering if there is currently a way to create those 4 binding but to have only one Adapter added to the EObject?

Thanks in advance,
Javi
Re: Reduce the number of Adapters created in EMF databinding [message #1316835 is a reply to message #1316785] Sat, 26 April 2014 19:34 Go to previous messageGo to next message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 854
Registered: July 2009
Senior Member
The current implementation of, for example, EObjectObservableValue does not check for any previously added adapters, so, this would be a task you have to do yourself.

What issue are you trying to resolve? Do you have any 'performance problems' or any 'excessive memory consumption" because of this?



Xavipen Mising name wrote on Sat, 26 April 2014 20:53
Hi,

I have started looking into detail to the EMF databinding framework. It is quite good, although i have one question.

If i have an EObject with 4 EAttributes i would like to make a binding to Text. I always end up with 4 new Adapters added to the EObject. In othe words, i end up with one new adapter added to the EObject per attribute i am binding.

I was wondering if there is currently a way to create those 4 binding but to have only one Adapter added to the EObject?

Thanks in advance,
Javi

Re: Reduce the number of Adapters created in EMF databinding [message #1316878] Sat, 26 April 2014 20:09 Go to previous messageGo to next message
Xavipen Mising name is currently offline Xavipen Mising nameFriend
Messages: 59
Registered: March 2011
Member
Hi Erdal,

Thanks for the quick response.

I am working on a system that process high data rates which besides the processing of the data means that it can get 10000+ updates por second in one active object. The current implementation was using its own adapter to trigger the updates of the bindings. The object has at least 20+ attributes. This is working well but it is not very clean.

I was investigating how get rip off the adapter and use directly the databindings. My concern is that the number of adapters may have an impact on the performance in this case, although i have not tested it.

Maybe, if i see issues there, I could look into transforming that adapter so the EMFPropertyValue can be register in the adapter. Then the adapter will be added to the EObject and would dispatched the notifications received from the EObject to the different EMFPropertyValues. Although i do not have a very clear idea of how to do this.


Re: Reduce the number of Adapters created in EMF databinding [message #1316921 is a reply to message #1316878] Sat, 26 April 2014 20:43 Go to previous messageGo to next message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 854
Registered: July 2009
Senior Member
As the change events are dispatched on the same thread (in the same {@link Realm}), i.e. are processed serially, there should not be any remarkable performance improvements if you would change to a single adapter, you would only optimize memory consumption.

Xavipen Mising name wrote on Sat, 26 April 2014 22:09
Hi Erdal,

Thanks for the quick response.

I am working on a system that process high data rates which besides the processing of the data means that it can get 10000+ updates por second in one active object. The current implementation was using its own adapter to trigger the updates of the bindings. The object has at least 20+ attributes. This is working well but it is not very clean.

I was investigating how get rip off the adapter and use directly the databindings. My concern is that the number of adapters may have an impact on the performance in this case, although i have not tested it.

Maybe, if i see issues there, I could look into transforming that adapter so the EMFPropertyValue can be register in the adapter. Then the adapter will be added to the EObject and would dispatched the notifications received from the EObject to the different EMFPropertyValues. Although i do not have a very clear idea of how to do this.



Re: Reduce the number of Adapters created in EMF databinding [message #1350978 is a reply to message #1316921] Mon, 12 May 2014 22:31 Go to previous message
Xavipen Mising name is currently offline Xavipen Mising nameFriend
Messages: 59
Registered: March 2011
Member
Thanks for the clarification!
Previous Topic:[CDO] [Compare] Merging branches, and back
Next Topic:Cast Excel-File to java.lang.Object problems
Goto Forum:
  


Current Time: Fri Mar 29 07:06:16 GMT 2024

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

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

Back to the top