Ticket #102 (closed defect: fixed)

Opened 3 months ago

Last modified 3 months ago

New event dispatching makes editing of large models slow

Reported by: arj..@yirdis.nl Assigned to: arj..@yirdis.nl
Priority: major Milestone: Gaphor 0.13.0
Component: Gaphor Version:
Keywords: Cc:

Description

The new dispatches is a big improvement in that handling of events is done in a central place (no difficult connect/disconnect code).

However, if models become bigger, the simple dispatching algorithm becomes slow. For example. Editing a package name on a package in the UML model file will result in a delay of approx. 10 seconds.

Attachments

Change History

02/18/08 22:48:03 changed by arj..@yirdis.nl

We should have a look at zope.component.event and zope.event. Those modules are dedicated to object specific dispatching. If we can dispatch based on the property provided in the (IElementChangeEvent) event, the dispatcher only has to call a few handler and my guess is our performance problem is solved.

02/19/08 23:28:46 changed by arj..@yirdis.nl

  • status changed from new to assigned.

What needs changing:

  1. A generic event handler should be registered for IElementChangeEvent events.
  2. In the application event handler should be registered for (umlproperty, event) pairs. This way handlers can tell if they're only interested in specific events from one source (=uml property).

Maybe we should also check the originating class. E.g. when a package changes it's name, a class instance should not be notified, although they refer the same attribute type (namely "name" defined in the NamedElement UML class). This would imply we should be able to register (UML class, event) pairs and/or (UML class, property, event) pairs.

See http://svn.zope.org/zope.component/trunk/src/zope/component/event.txt?view=markup and http://svn.zope.org/zope.component/trunk/src/zope/component/event.py?view=markup for some background on how events work (we do not need zope.component.event since Gaphor doesn't dispatch ObjectEvents, but it's the same idea).

02/23/08 13:27:44 changed by arj..@yirdis.nl

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [2220]) okay, this seems to fix #102. Just add some extra constraints. Amazing what one can do between to key presses.


Add/Change #102 (New event dispatching makes editing of large models slow)




Action