ENH: Speed up and clean up 3D code#14016
Conversation
|
At some point, it may be nice to split of all the referrer tracking code into its own package. This looks very useful also for debugging other projects with memory leaks. |
wmvanvliet
left a comment
There was a problem hiding this comment.
I did some simple testing and plotting sensors is now much faster. Much appreciated. I just need to find a new way now to color selected sensors in the dipole fitting GUI.
Okay when coding this I wasn't 100% sure if this was needed. But it does provide a motivation for implemeting the |
Yeah |
larsoner
left a comment
There was a problem hiding this comment.
I'll check the outputs soon and then merge assuming everything still works. @wmvanvliet the vtkGlypthActor3D has been implemented, and there's code in there that shows you can update the colors easily now by updating the point_scalars["colors"] array, and marking the object as modified!
| "pyvistaqt >= 0.11", # released 2023-06-30, no newer version available | ||
| "pyxdf", | ||
| "pyzmq != 24.0.0", | ||
| "refleak >=0.1", |
There was a problem hiding this comment.
@wmvanvliet I've pushed this to https://github.com/mne-tools/refleak and https://pypi.org/project/refleak/#history and started using it here. I'll iterate until it works but hopefully it should. I'll make corresponding PRs to pyvistaqt and pyvista soon!
While I was digging through mne-tools/mne-kit-gui#68, I realized our codebase uses a lot of older PyVista idioms that we can clean up. But that in turn inspired some other changes:
Lights) and remove cruft related to older versions, plus params/modes we never actually use (resolution, polygon_offset)plot_alignmentspeedup)_assert_no_instancesby avoiding multiplegc.collect()calls (by usingrequest), and by keeping track ofBraininstances directly when in testing mode (which greatly reduces the search surface whenassert_no_instancescode out of MNE and into https://github.com/mne-tools/refleak and added them as doc-build and test depsI used Claude Sonnet 5 to help with this (especially the profiling), but I understand and vouch for all code.