[Uml-devel] [Bug 101148] Performance problem with large models

Oliver Kellogg okellogg at users.sourceforge.net
Fri Mar 18 17:16:27 UTC 2005


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=101148         
okellogg users sourceforge net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From okellogg users sourceforge net  2005-03-19 02:13 -------
CVS commit by okellogg: 

UMLListView::{slotObjectCreated,childObjectAdded}: It turns out the slowdown
was caused by calling ensureItemVisible() during UMLDoc::resolveTypes().
BUG:101148


  M +7 -3      umllistview.cpp   1.150
  M +4 -1      umlobject.cpp   1.71
  M +5 -0      umlobject.h   1.51


--- kdesdk/umbrello/umbrello/umllistview.cpp  #1.149:1.150
 @ -597,4 +597,6  @ void UMLListView::slotObjectCreated(UMLO
         connectNewObjectsSlots(object);
         newItem = new UMLListViewItem(parentItem, object->getName(), convert_OT_LVT(type), object);
+        if (m_doc->loading())
+                return;
         ensureItemVisible(newItem);
         newItem->setOpen(true);
 @ -686,8 +688,10  @ void UMLListView::childObjectAdded(UMLOb
                 UMLListViewItem *newItem = new UMLListViewItem(parentItem, text,
                                                                convert_OT_LVT(obj->getBaseType()), obj);
+                if (! m_doc->loading()) {
                 ensureItemVisible(newItem);
                 clearSelection();
                 setSelected(newItem, true);
         }
+        }
         connectNewObjectsSlots(obj);
 }

--- kdesdk/umbrello/umbrello/umlobject.cpp  #1.70:1.71
 @ -63,4 +63,5  @ void UMLObject::init() {
         m_bStatic = false;
         m_bInPaste = false;
+        m_bCreationWasSignalled = false;
         m_pSecondary = NULL;
 }
 @ -328,9 +329,11  @ QString UMLObject::getSecondaryId() cons
 
 void UMLObject::maybeSignalObjectCreated() {
-        if (m_BaseType != Uml::ot_Stereotype &&
+        if (!m_bCreationWasSignalled &&
+            m_BaseType != Uml::ot_Stereotype &&
             m_BaseType != Uml::ot_Association &&
             m_BaseType != Uml::ot_Role) {
                 UMLDoc* umldoc = UMLApp::app()->getDocument();
                 umldoc->signalUMLObjectCreated(this);
+                m_bCreationWasSignalled = true;
         }
 }

--- kdesdk/umbrello/umbrello/umlobject.h  #1.50:1.51
 @ -414,4 +414,9  @ protected:
 
         /**
+         * Auxiliary to maybeSignalObjectCreated().
+         */
+        bool m_bCreationWasSignalled;
+
+        /**
          * Pointer to an associated object.
          * Only a few of the classes inheriting from UMLObject use this.




More information about the umbrello-devel mailing list