Pascal code import is very slow. Not sure if this is normal. No crash, no error. (some files take minutes to import) Use following code: https://emuloader.mameworld.info/files/el888-src.rar STEPS TO REPRODUCE 1. Import code 2. Observe the time needed to import the code OBSERVED RESULT Pascal code import is very slow. EXPECTED RESULT Pascal code import was much faster in previous version. SOFTWARE/OS VERSIONS Windows: git 126264fd KDE binary factory ADDITIONAL INFORMATION
el888-source has 241473 total lines of code with a few hefty files, 3496 ShellCtrls.pas 3683 Menus.pas 4740 uCommon.pas 5145 StdCtrls.pas 5262 ExtCtrls.pas 7318 arcade/uMAMESettings.pas 9057 CommCtrl.pas 11003 Controls.pas 18035 system.pas 22955 ComCtrls.pas 31087 Windows.pas 51592 uMain.pas On importing all, that works out to around 400 lines per second. I'd say the speed is in a gray area but could use improving. Don't forget that prior to the fixes, it was importing only a fraction of the classes/attributes due to bugs - that's why it was faster then.
Ok. The crash is fixed and it's working now!
*** Removed by KDE Sysadmin for violation of the KDE Community Code of Conduct ***
Git commit 0d855d0deb419f0a38bc486ce0441da42988904b by Oliver Kellogg. Committed on 13/06/2022 at 05:56. Pushed by okellogg into branch 'master'. Fix "Pascal code import is very slow" umbrello/umllistviewitem.{h,cpp} - Remove empty reimplementation of destructor (we want the parent destructor to execute). - Member m_comap is renamed to s_comap, changed to `static`, and is changed pointer. It now acts as a global map for all UMLObjects pertaining to the list view. The switch to pointer is done for reducing risk of static initialization order problems. - New static function deleteItem removes the given UMLListViewItem from s_comap and calls its destructor. - At function findChildObject add `const` on argument `child`. - New protected function findUMLObject_r is auxiliary to findUMLObject. It is invoked when the given object is not found in s_comap. - Change implementation of ChildObjectMap from QMap to QHash. Reason: QHash is more appropriate for pointer arguments. umbrello/umllistviewitem.cpp - In function init() allocate s_comap if null. - Adjust functions addChildItem, deleteChildItem, deepCopy to the changes related to m_comap -> s_comap. umbrello/umllistview.cpp - In function slotObjectCreated add calls to parentItem->addChildItem() for updating s_comap. - In function slotObjectRemoved replace destruction of `item` by call to deleteItem() in order to update s_comap. - In function init(), - reduce content of `if (m_rv == 0)`; - call clean() unconditionally; - execute for-loop over N_MODELTYPES unconditionally and in its body add call to m_rv->addChildItem(sysFolder, m_lv[i]) for updating s_comap; - call m_lv[Uml::ModelType::Logical]->addChildItem(datatypeFolder) for updating s_comap with m_datatypeFolder. - In function clean(), - clean up documentation; - set m_datatypeFolder to 0; - in for-loop over N_MODELTYPES remove call to deleteChildrenOf() and add setting of m_lv[i] to 0; - call deleteChildrenOf(m_rv). - In function moveObject, - remove handling of m_doc->loading() (see function acceptDrag); - replace `delete move` by UMLListViewItem::deleteItem(move) for updating s_comap; - add handling of case UMLListViewItem::lvt_EnumLiteral. - In function addNewItem case instanceOfClass add call to instanceItem->addChildItem() for updating s_comap. - In function loadChildrenFromXMI loading of structural objects add call to parent->addChildItem() to update s_comap. - In function deleteChildrenOf case (typeIsCanvasWidget(lvt) || typeIsClassifierList(lvt)) case !object, replace `delete temp` by call to UMLListViewItem::deleteItem(temp). FIXED-IN: 2.34.70 (KDE releases 22.07.70) M +86 -65 umbrello/umllistview.cpp M +58 -18 umbrello/umllistviewitem.cpp M +8 -6 umbrello/umllistviewitem.h https://invent.kde.org/sdk/umbrello/commit/0d855d0deb419f0a38bc486ce0441da42988904b