Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc) » Teneo: getChoiceOfValues(Object object) very long...
Teneo: getChoiceOfValues(Object object) very long... [message #79049] |
Tue, 10 April 2007 09:37 |
Eclipse User |
|
|
|
Originally posted by: mat.loo.gmail.com
Hi,
The method
public Collection getChoiceOfValues(Object object)
from
org.eclipse.emf.edit.provider.IItemPropertyDescriptor
can be very long while using EMF/Teneo because it seems a lot of requests
are sent by Hibernate.
Is there a basic way to avoid such a time consuming ?
Furthermore, it seems, these calls are made even if the data have not
changed between 2 calls.
Do you see something to avoid this too ?
Thx.
|
|
| |
Re: Teneo: getChoiceOfValues(Object object) very long... [message #79076 is a reply to message #79065] |
Tue, 10 April 2007 09:57 |
Eclipse User |
|
|
|
Originally posted by: mat.loo.gmail.com
Hi,
Yes, my method is time consuming when calling it for a EReference that has
many objects.
So it seems very logical that it is time consuming !
Besides, in my context, this method can be called "recursively" since it
can be used in a "Copy objects" context. That is I want to copy the target
object and children of children... These children are not necesseraly
"econtainment" of other objects, the parent-to-child link is
functionnal-oriented and not container-to-containment oriented in my
context.
BUT.
I hoped it would not take so much time...
I guess I'm doing something wrong because I spend a lot of time in this
method...
There is no parametrization I should use ?
Thx
|
|
|
Re: Teneo: getChoiceOfValues(Object object) very long... [message #79091 is a reply to message #79076] |
Tue, 10 April 2007 10:07 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Mat,
No there is no parametrization. Often paging is used to support the visualization of a choice from a
list of many objects. I would also advice to use the newest release of teneo as this one supports
hibernate proxies which makes it possible that also many-to-ones are loaded lazily.
Please check the hibernate manual for more information on hibernate proxying (and the elver.org
website).
gr. Martin
Mat Lo wrote:
> Hi,
>
> Yes, my method is time consuming when calling it for a EReference that
> has many objects.
> So it seems very logical that it is time consuming !
> Besides, in my context, this method can be called "recursively" since it
> can be used in a "Copy objects" context. That is I want to copy the
> target object and children of children... These children are not
> necesseraly "econtainment" of other objects, the parent-to-child link is
> functionnal-oriented and not container-to-containment oriented in my
> context.
>
> BUT.
> I hoped it would not take so much time...
> I guess I'm doing something wrong because I spend a lot of time in this
> method...
>
> There is no parametrization I should use ?
>
> Thx
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Re: Teneo: getChoiceOfValues(Object object) very long... [message #79104 is a reply to message #79076] |
Tue, 10 April 2007 11:48 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Mat,
If possible, you could consider specializing the property descriptor's
getChoiceOfValues methods to not search the entire set of all reachable
objects which is what it's currently doing in order to find all the
objects that are instances of the particular EReference's EClass. I
suppose you could also look into caching the result of either the whole
set, or of just the ones that match a particular EClass, but then you'd
get into issues of when to clear the cache (perhaps after a command is
executed).
Mat Lo wrote:
> Hi,
>
> Yes, my method is time consuming when calling it for a EReference that
> has many objects.
> So it seems very logical that it is time consuming !
> Besides, in my context, this method can be called "recursively" since
> it can be used in a "Copy objects" context. That is I want to copy the
> target object and children of children... These children are not
> necesseraly "econtainment" of other objects, the parent-to-child link
> is functionnal-oriented and not container-to-containment oriented in
> my context.
>
> BUT.
> I hoped it would not take so much time...
> I guess I'm doing something wrong because I spend a lot of time in
> this method...
>
> There is no parametrization I should use ?
>
> Thx
>
|
|
|
Re: Teneo: getChoiceOfValues(Object object) very long... [message #79134 is a reply to message #79104] |
Tue, 10 April 2007 13:30 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Mat,
Refering to the post of Ed, you can use a hql query to only retrieve the objects of a specific type.
gr. Martin
Ed Merks wrote:
> Mat,
>
> If possible, you could consider specializing the property descriptor's
> getChoiceOfValues methods to not search the entire set of all reachable
> objects which is what it's currently doing in order to find all the
> objects that are instances of the particular EReference's EClass. I
> suppose you could also look into caching the result of either the whole
> set, or of just the ones that match a particular EClass, but then you'd
> get into issues of when to clear the cache (perhaps after a command is
> executed).
>
>
> Mat Lo wrote:
>> Hi,
>>
>> Yes, my method is time consuming when calling it for a EReference that
>> has many objects.
>> So it seems very logical that it is time consuming !
>> Besides, in my context, this method can be called "recursively" since
>> it can be used in a "Copy objects" context. That is I want to copy the
>> target object and children of children... These children are not
>> necesseraly "econtainment" of other objects, the parent-to-child link
>> is functionnal-oriented and not container-to-containment oriented in
>> my context.
>>
>> BUT.
>> I hoped it would not take so much time...
>> I guess I'm doing something wrong because I spend a lot of time in
>> this method...
>>
>> There is no parametrization I should use ?
>>
>> Thx
>>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
| | | |
Re: Teneo: getChoiceOfValues(Object object) very long... [message #604535 is a reply to message #79065] |
Tue, 10 April 2007 09:57 |
Eclipse User |
|
|
|
Originally posted by: mat.loo.gmail.com
Hi,
Yes, my method is time consuming when calling it for a EReference that has
many objects.
So it seems very logical that it is time consuming !
Besides, in my context, this method can be called "recursively" since it
can be used in a "Copy objects" context. That is I want to copy the target
object and children of children... These children are not necesseraly
"econtainment" of other objects, the parent-to-child link is
functionnal-oriented and not container-to-containment oriented in my
context.
BUT.
I hoped it would not take so much time...
I guess I'm doing something wrong because I spend a lot of time in this
method...
There is no parametrization I should use ?
Thx
|
|
|
Re: Teneo: getChoiceOfValues(Object object) very long... [message #604536 is a reply to message #79076] |
Tue, 10 April 2007 10:07 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Mat,
No there is no parametrization. Often paging is used to support the visualization of a choice from a
list of many objects. I would also advice to use the newest release of teneo as this one supports
hibernate proxies which makes it possible that also many-to-ones are loaded lazily.
Please check the hibernate manual for more information on hibernate proxying (and the elver.org
website).
gr. Martin
Mat Lo wrote:
> Hi,
>
> Yes, my method is time consuming when calling it for a EReference that
> has many objects.
> So it seems very logical that it is time consuming !
> Besides, in my context, this method can be called "recursively" since it
> can be used in a "Copy objects" context. That is I want to copy the
> target object and children of children... These children are not
> necesseraly "econtainment" of other objects, the parent-to-child link is
> functionnal-oriented and not container-to-containment oriented in my
> context.
>
> BUT.
> I hoped it would not take so much time...
> I guess I'm doing something wrong because I spend a lot of time in this
> method...
>
> There is no parametrization I should use ?
>
> Thx
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Re: Teneo: getChoiceOfValues(Object object) very long... [message #604541 is a reply to message #79076] |
Tue, 10 April 2007 11:48 |
Ed Merks Messages: 33218 Registered: July 2009 |
Senior Member |
|
|
Mat,
If possible, you could consider specializing the property descriptor's
getChoiceOfValues methods to not search the entire set of all reachable
objects which is what it's currently doing in order to find all the
objects that are instances of the particular EReference's EClass. I
suppose you could also look into caching the result of either the whole
set, or of just the ones that match a particular EClass, but then you'd
get into issues of when to clear the cache (perhaps after a command is
executed).
Mat Lo wrote:
> Hi,
>
> Yes, my method is time consuming when calling it for a EReference that
> has many objects.
> So it seems very logical that it is time consuming !
> Besides, in my context, this method can be called "recursively" since
> it can be used in a "Copy objects" context. That is I want to copy the
> target object and children of children... These children are not
> necesseraly "econtainment" of other objects, the parent-to-child link
> is functionnal-oriented and not container-to-containment oriented in
> my context.
>
> BUT.
> I hoped it would not take so much time...
> I guess I'm doing something wrong because I spend a lot of time in
> this method...
>
> There is no parametrization I should use ?
>
> Thx
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: Teneo: getChoiceOfValues(Object object) very long... [message #604550 is a reply to message #79104] |
Tue, 10 April 2007 13:30 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Mat,
Refering to the post of Ed, you can use a hql query to only retrieve the objects of a specific type.
gr. Martin
Ed Merks wrote:
> Mat,
>
> If possible, you could consider specializing the property descriptor's
> getChoiceOfValues methods to not search the entire set of all reachable
> objects which is what it's currently doing in order to find all the
> objects that are instances of the particular EReference's EClass. I
> suppose you could also look into caching the result of either the whole
> set, or of just the ones that match a particular EClass, but then you'd
> get into issues of when to clear the cache (perhaps after a command is
> executed).
>
>
> Mat Lo wrote:
>> Hi,
>>
>> Yes, my method is time consuming when calling it for a EReference that
>> has many objects.
>> So it seems very logical that it is time consuming !
>> Besides, in my context, this method can be called "recursively" since
>> it can be used in a "Copy objects" context. That is I want to copy the
>> target object and children of children... These children are not
>> necesseraly "econtainment" of other objects, the parent-to-child link
>> is functionnal-oriented and not container-to-containment oriented in
>> my context.
>>
>> BUT.
>> I hoped it would not take so much time...
>> I guess I'm doing something wrong because I spend a lot of time in
>> this method...
>>
>> There is no parametrization I should use ?
>>
>> Thx
>>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
| | |
Goto Forum:
Current Time: Thu Sep 26 21:23:52 GMT 2024
Powered by FUDForum. Page generated in 0.04993 seconds
|