Don't add actual subsets to CubevizProfileView#3626
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3626 +/- ##
============================
============================
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This was because we needed more advanced options for how to handle the extraction than simply pulling the pixels from within the max. Ideally we should probably move away from the profile viewer and use a scatter viewer instead, right? This PR seems to break creating spectral subsets (xrange) in the profile viewer itself. Is there anyway to restore that functionality and only block adding the profiles of spatial subsets created in the cube viewers? |
6abf102 to
1e34008
Compare
|
@kecnry I've pushed a fix, the easiest way at the moment is to check if the subset state is derived based on one or two attributes - if it's based on two we know it was made in the image viewer. |
1e34008 to
c391e54
Compare
c391e54 to
c57bc30
Compare
rosteen
left a comment
There was a problem hiding this comment.
Test failures are from our ongoing remote data problems, unrelated to this PR. This is a drastic improvement, as you showed elsewhere I see performance scaling much more linearly with number of subsets now with this combined with the other improvements. Thanks!
javerbukh
left a comment
There was a problem hiding this comment.
Looks good, thank you!
Description
While I don't understand the motivations behind this, it seems the cubeviz profile viewer doesn't actually use glue subsets and instead uses extracted datasets and pretends they are subsets. However, because of the way glue works, all subsets that are defined automatically get added to all datasets, and if a dataset is in a viewer, subsets will get added automatically. This means that if one had a cube loaded in cubeviz and had extracted say 10 subsets, there would be 11 datasets in the cubeviz profile viewer plus 110 subsets. The subsets were all set to be not visible, but having them in the viewer still slows things down a lot as they still all have a layer artist and state instantiated in case the visibility changes.
The simple fix is to simply not accept any subsets in the cubeviz profile viewer. This is valid usage -
add_dataandadd_subsetcan just return without adding data or subsets.With 10 subsets, this speeds up cubeviz by a factor of 9x (in addition to the new echo 0.11 release)
Change log entry
CHANGES.rst? If you want to avoid merge conflicts,list the proposed change log here for review and add to
CHANGES.rstbefore merge. If no, maintainershould add a
no-changelog-entry-neededlabel.Checklist for package maintainer(s)
This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.
triviallabel.