This topic was created to capture discussion from https://github.com/Slicer/Slicer/pull/490#issuecomment-223869817
As suggested by @lassoan, if someone was time to invest, here are suggestions to address two specific bottlenecks:
(1) Scene model: A complete scene model is created in many MRML widgets (e.g., in each MRML node selector and node tree), with lots of observers on many nodes. Having a single scene model that contains all necessary information about all nodes in the scene (and a couple of filters&proxies) used by all widgets would probably make things scalable much better.
(2) Model hierarchies: Slicer doesn’t store low-level each low-level item (such as a fiducial point, a label, or segment) in a separate node for good reasons - mainly for performance for simplicity for module developers.
For example, at some point fiducials were attempted to be stored as “one node per fiducial” but it was complex to use and it was terribly slow. Changing fiducial management to have multiple markups in a single node solved the problems.
I think model nodes should work the same way: they should be able to manage many meshes internally (probably not just in a flat list but organized using tags or parent/children relationships), we should not require a separate node for each.
By investing a couple of weeks into either 1 and/or 2, you might achieve 10-100x performance improvement in managing large number of models (vs an optimistic 2-10x performance improvement by further general optimization of scene management).