View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0003379||3 - Current Dev List||Maintenance||public||2019-07-05 22:34||2019-07-13 16:47|
|Target Version||Fixed in Version|
|Summary||0003379: Rig Control's drop-down buttons structure is inefficient|
|Description||One of the large data structures used in rig Control to describe radio settings and their representative UI is aButtonsMulti, which is an array of anonymous structures that contain radio, button title, and descriptive information that describe and implement drop-down buttons in the Rig Contro UI.|
In the long term, we should replace this array of sturctures with a map of polymorphic classes keyed by the radio name. This approach has been demonstrated to work well with other structures, since linear searching isn't necessary. Further, special-case code can be encapsulated in the classes rather than spread throughout the code as is done onw.
One initial step toward that change is to get rid of the lpszSpecial string which is used to flag special handling for certain entries. This is terrible, since string comparisons each time the entry is touched and those calls are embedded in loops. Lots of temporary CString objects are created, memory is thrashed, and so on.
A first cut would be to replace the strings with an enum value. These are trivial integer comparisons, are type-safe, and more descriptive in the source code and the debugger.
|Tags||No tags attached.|