Skip to content

Move add_volume call to background thread

Duggan, John requested to merge 3-fix-disconnection-during-render into main

Summary of Changes

The call to add_volume is painfully slow on large datasets, to the point that it blocks the main thread enough to crash the Trame front-end when running on the turbine. To get around this, I've moved it to a background thread and set render=False since VTK can't render in background threads.

This does mean that we have to call render explicitly in the main thread. If that is sufficiently slow (it's fine for the turbine in my testing), then it's possible the front-end will crash there.

Checklist

  • The MR has a clear and concise title
  • Code is self-documented and follows style guidelines.
  • Automated tests are written and pass successfully.
  • Regression tests (e.g. manually triggered system tests, manual GUI/tool tests, ...) are performed to make sure the MR does not break anything (when applicable)
  • Readme file is present and up-to-date.

Documentation Updates

Additional Notes

Closes #3 (closed)

Merge request reports