Home » Modeling » EMF » Problem performance getString of ItemProvider
Problem performance getString of ItemProvider [message #496571] |
Tue, 10 November 2009 10:19  |
Eclipse User |
|
|
|
Hello,
I use the Master/DetailsPage pattern in my RCP application. And when the MasterPage tree contains a lot of elements, I have a problem of performance. For exemple when I want to add a new element in the tree, the application is stick during the action, but not with some elements.
I think the problem comes from the ItemProvider of the selected element, because the methods getFeatureText and getTextType are called for all the tree elements, and for the same label. These calls take a lot of time.
Any ideas to manage these methods in order to avoid to call them more than one time for the same label?
Thx for you help,
David.
|
|
| | | | |
Re: Problem performance getString of ItemProvider [message #498291 is a reply to message #498276] |
Mon, 16 November 2009 06:45   |
Eclipse User |
|
|
|
David,
Comments below.
David CHAUTARD wrote:
> Thanks Ed,
>
> Quote:
>> I'd expect it to be proportional to the types of children and the
>> number of selected objects
>
> You think that this behaviour in normal?
It's not entirely clear to me what "this behavior" you're referring to,
but yes, of course it's going to be proportional to the number of menu
entries that need to be populated.
> I understand that these methods are called for the selection, but I
> don't understand why it is done for each element of my tree, because
> the same treatment is realised several time, while just a treatment
> for the selection is needed.
I don't understand either and that's not normal behavior. I imagine the
debugger would be better at explaining this than me.
> My problem is when I add or remove an element of my tree, the action
> is very long, according to this treatment, while it should be fast.
>
> Have you an idea to improve this treatment?
Given that I can't reproduce your problem, it's hard to explain what you
might do differently to avoid it. It seems to me the problem is the
fact it's being called for every element of the tree and not just for
the one selected element.
>
> Thx,
> David.
|
|
| | | | | | | | |
Re: Problem performance getString of ItemProvider [message #499982 is a reply to message #499607] |
Tue, 24 November 2009 11:15  |
Eclipse User |
|
|
|
Hi,
I totally agree with you. But in some case we can have a size limitation for an action. And I don't know what is this limitation for an ArrayList. I search a way to improve my action in order not to stick my application. I think about synchronisation, but I don't know how to etablish it without modify embedded code.
In all case thanks for your help,
David.
|
|
|
Goto Forum:
Current Time: Wed Jul 02 19:44:18 EDT 2025
Powered by FUDForum. Page generated in 0.04422 seconds
|