Performance - UML class property settings menu take 90 seconds to launch
Version
Commit 0997887d
Description
The toolbox is located to the left in the main windows. It provide the buttons to create diagram objects and tools.
After a UML class have been created an object menu is available by right clicking the UML class object in the diagram view. On of the menu is “properties”. This opens a tab menu that enable the user set various UML related settings.
Issue
It take about 90 seconds for the property menu to launch for every new UML class.
The call chain: app/disp_callbacks.c::create_object_menu app/disp_callbacks.c::add_properties_menu_item app/commands.c::dialogs_properties_callback app/properties-dialog.c::object_list_properties_show objects/UML/class_dialog.c::umlclass_get_properties objects/UML/class_dialog.c::create_dialog_pages objects/UML/class_dialog.c::style_create_page objects/UML/class_dialog.c::create_font_props_row lib/dia-font-selector.c::dia_font_selector_class_init lib/dia-font-selector.c::dia_font_selector_init
The issue is the dia_font_selector_init. As one of many subtasks this function iterate over all font families. This information is used for the styles tab listing 6 different type of font options. The function dia_font_selector_init is called for each of the 6 font options.
It takes about 15 seconds to iterate over 400 font families. Recall that some fonts like Noto comes with huge number font families so this is not a particular high number. Since this is repeated for each of the 6 font types this adds up to 90 seconds.
Effects
The time it take is launch the property menu is to long. Things is made worse since there is no feedback to the user during this time. Also the user have no way of knowing that this directly proportionally to the number of installed font families.
Setup
Create a UML class. Default settings empty canvas.
Test case
Manual
Right click on the UML class and select properties menu option. A property menu will appear after some amount of time.
Expected result: The menu appears with little or no delay Actual result: The application is halted for an extended period of time.