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 05: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 #79091 is a reply to message #79076] |
Tue, 10 April 2007 06:07   |
Eclipse User |
|
|
|
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 07: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 09:30   |
Eclipse User |
|
|
|
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 #79196 is a reply to message #79149] |
Tue, 10 April 2007 09:57  |
Eclipse User |
|
|
|
Hi Mat,
See my post after Ed. You can use a hql query to just query for a specific eclass. Hibernate
supports session caching as well as level 2 caching (between sessions).
gr. Martin
Mat Lo wrote:
> Thx Ed.
>
> Martin, is Teneo able to manage such a cache Ed is talking about ?
>
--
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 #604529 is a reply to message #79049] |
Tue, 10 April 2007 05:45  |
Eclipse User |
|
|
|
Hi Mat,
What does the method do in your case?
Is the method called for an ereference which refers to an type which has many instances in the db?
gr. Martin
Mat Lo wrote:
> 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.
>
--
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 05: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 06:07  |
Eclipse User |
|
|
|
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 07:48  |
Eclipse User |
|
|
|
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 #604550 is a reply to message #79104] |
Tue, 10 April 2007 09:30  |
Eclipse User |
|
|
|
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 #604563 is a reply to message #79149] |
Tue, 10 April 2007 09:57  |
Eclipse User |
|
|
|
Hi Mat,
See my post after Ed. You can use a hql query to just query for a specific eclass. Hibernate
supports session caching as well as level 2 caching (between sessions).
gr. Martin
Mat Lo wrote:
> Thx Ed.
>
> Martin, is Teneo able to manage such a cache Ed is talking about ?
>
--
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: Wed Jul 23 10:37:14 EDT 2025
Powered by FUDForum. Page generated in 0.10071 seconds
|