Description
Is your feature request related to a problem? Please describe.
Instantiating an ObjC class with rubicon-objc takes about 600 - 700 μs which is relatively slow compared to PyObjc with 10 - 15 μs. This can become problematic for instance when showing a table with 30 rows and 5 columns which are visible (see beeware/toga#1030): each of the 150 cells is a NSTableCellView
which has a NSTextField
and a NSImageView
and 6 layout constraints. Creating these 1350 class instances then takes almost one second which is a very noticeable lag for a "simple" table. A similar task in PyObjc takes about 16 ms.
Describe the solution you'd like
Speed up the creation of ObjCClass instances. I am not sure about how rubicon-objc handles creating class instances but can try to look through the code to see if there are obvious slowdowns.