Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Big Performance Issue - Hit Testing on Editor Activation
Big Performance Issue - Hit Testing on Editor Activation [message #231424] Thu, 08 March 2007 22:02 Go to next message
Adam Cabler is currently offline Adam CablerFriend
Messages: 113
Registered: July 2009
Senior Member
I recently added several thousand connections to my diagram. I fixed
some scrolling problems, but now I am having a problem I don't think I
can fix. When selecting the diagram editor, it is taking around 5
seconds to become active. I profiled it and it seems that hit testing
(containsPoint()) is being done on _every_ edit part in the diagram and
this is what is consuming the time. I wanted to see if anyone else has
this problem and if there is something that can be done.

thanks,
adam
Re: Big Performance Issue - Hit Testing on Editor Activation [message #231434 is a reply to message #231424] Thu, 08 March 2007 22:57 Go to previous messageGo to next message
Adam Cabler is currently offline Adam CablerFriend
Messages: 113
Registered: July 2009
Senior Member
I did some more digging and it looks like all the time is being spent in
FocusTraverseManager.getNextFocusableFigure. This is making things
unusable for me atm. If anyone has some thoughts on this, I would
appreciate it.

adam

AdamC wrote:
> I recently added several thousand connections to my diagram. I fixed
> some scrolling problems, but now I am having a problem I don't think I
> can fix. When selecting the diagram editor, it is taking around 5
> seconds to become active. I profiled it and it seems that hit testing
> (containsPoint()) is being done on _every_ edit part in the diagram and
> this is what is consuming the time. I wanted to see if anyone else has
> this problem and if there is something that can be done.
>
> thanks,
> adam
Re: Big Performance Issue - Hit Testing on Editor Activation [Solved - FocusTraversalManager] [message #231441 is a reply to message #231434] Thu, 08 March 2007 23:30 Go to previous messageGo to next message
Adam Cabler is currently offline Adam CablerFriend
Messages: 113
Registered: July 2009
Senior Member
ok - I think I fixed the problem. I made my diagram figures focus
traversable. This makes getNextFocusableFigure return really quickly and
doesn't have to iterate over the 100k figures in my diagram. I hope
maybe this helps someone else...

adam

AdamC wrote:
> I did some more digging and it looks like all the time is being spent in
> FocusTraverseManager.getNextFocusableFigure. This is making things
> unusable for me atm. If anyone has some thoughts on this, I would
> appreciate it.
>
> adam
>
> AdamC wrote:
>> I recently added several thousand connections to my diagram. I fixed
>> some scrolling problems, but now I am having a problem I don't think I
>> can fix. When selecting the diagram editor, it is taking around 5
>> seconds to become active. I profiled it and it seems that hit testing
>> (containsPoint()) is being done on _every_ edit part in the diagram
>> and this is what is consuming the time. I wanted to see if anyone
>> else has this problem and if there is something that can be done.
>>
>> thanks,
>> adam
Re: Big Performance Issue - Hit Testing on Editor Activation [message #231544 is a reply to message #231434] Sat, 10 March 2007 13:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.ibm.com

That code is known to have n^2 performance, unfortunately. A patch could
probably improve it. You can also short circuit the whole focus search by
setting the top figure as disabled or no focusable or something like that.
That probably makes the most sense.

"AdamC" <acabler@hotmail.com> wrote in message
news:esq4dm$d63$1@utils.eclipse.org...
>I did some more digging and it looks like all the time is being spent in
>FocusTraverseManager.getNextFocusableFigure. This is making things
>unusable for me atm. If anyone has some thoughts on this, I would
>appreciate it.
>
> adam
>
> AdamC wrote:
>> I recently added several thousand connections to my diagram. I fixed
>> some scrolling problems, but now I am having a problem I don't think I
>> can fix. When selecting the diagram editor, it is taking around 5
>> seconds to become active. I profiled it and it seems that hit testing
>> (containsPoint()) is being done on _every_ edit part in the diagram and
>> this is what is consuming the time. I wanted to see if anyone else has
>> this problem and if there is something that can be done.
>>
>> thanks,
>> adam
Re: Big Performance Issue - Hit Testing on Editor Activation [Solved - FocusTraversalManager] [message #231568 is a reply to message #231441] Sat, 10 March 2007 21:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kvdijken.tiscali.nl

I also had troubles with performance on very large models. Besides doing your trick, I also
implemented a spatial index in figures with many children. This made it (selection and such) fly again.

Koen



AdamC wrote:
> ok - I think I fixed the problem. I made my diagram figures focus
> traversable. This makes getNextFocusableFigure return really quickly and
> doesn't have to iterate over the 100k figures in my diagram. I hope
> maybe this helps someone else...
>
> adam
>
> AdamC wrote:
>> I did some more digging and it looks like all the time is being spent
>> in FocusTraverseManager.getNextFocusableFigure. This is making things
>> unusable for me atm. If anyone has some thoughts on this, I would
>> appreciate it.
>>
>> adam
>>
>> AdamC wrote:
>>> I recently added several thousand connections to my diagram. I fixed
>>> some scrolling problems, but now I am having a problem I don't think
>>> I can fix. When selecting the diagram editor, it is taking around 5
>>> seconds to become active. I profiled it and it seems that hit
>>> testing (containsPoint()) is being done on _every_ edit part in the
>>> diagram and this is what is consuming the time. I wanted to see if
>>> anyone else has this problem and if there is something that can be done.
>>>
>>> thanks,
>>> adam
Re: Big Performance Issue - Hit Testing on Editor Activation [message #231618 is a reply to message #231544] Mon, 12 March 2007 21:22 Go to previous message
Adam Cabler is currently offline Adam CablerFriend
Messages: 113
Registered: July 2009
Senior Member
thanks for the info, Randy. It's good to see you over here;)

Randy Hudson wrote:
> That code is known to have n^2 performance, unfortunately. A patch could
> probably improve it. You can also short circuit the whole focus search by
> setting the top figure as disabled or no focusable or something like that.
> That probably makes the most sense.
>
> "AdamC" <acabler@hotmail.com> wrote in message
> news:esq4dm$d63$1@utils.eclipse.org...
>> I did some more digging and it looks like all the time is being spent in
>> FocusTraverseManager.getNextFocusableFigure. This is making things
>> unusable for me atm. If anyone has some thoughts on this, I would
>> appreciate it.
>>
>> adam
>>
>> AdamC wrote:
>>> I recently added several thousand connections to my diagram. I fixed
>>> some scrolling problems, but now I am having a problem I don't think I
>>> can fix. When selecting the diagram editor, it is taking around 5
>>> seconds to become active. I profiled it and it seems that hit testing
>>> (containsPoint()) is being done on _every_ edit part in the diagram and
>>> this is what is consuming the time. I wanted to see if anyone else has
>>> this problem and if there is something that can be done.
>>>
>>> thanks,
>>> adam
>
>
Previous Topic:JUnit testing of GEF application
Next Topic:CheckboxTreeViwer in a GEF OutlineContentPage
Goto Forum:
  


Current Time: Thu Apr 25 08:38:48 GMT 2024

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

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

Back to the top