Changes between Initial Version and Version 3 of Ticket #8004


Ignore:
Timestamp:
Feb 28, 2025, 5:11:34 PM (8 months ago)
Author:
Zach Pearson
Comment:

After optimizing DICOM and Segmentations I was inspired to take a look at what was being done during startup and think about how that work might be reordered to increase the apparent startup time (see the attached file, flamegraph.html).

It takes about 1.4 seconds to get to UI.build, which takes another second to finish, and in the way is a 250ms numpy import, 250ms to import Qt (this is PySide6, it's slightly longer with production builds because of the need to call promote_enums), 300ms to run UI.init (unavoidable, that's QApplication's initializer).

I'm not sure what a good solution looks like yet. We could use tinyarray more for small arrays to eliminate some numpy imports in geometry (which makes the compiled half of geometry complain that it needs numpy arrays) or inline BufferType somewhere to get rid of the top-level numpy import in opengl.py. At least one use of numpy looks unavoidable which is Color.init

Legend:

Unmodified
Added
Removed
Modified