Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subsets taking a long time to finalize in Cubeviz on main #3181

Open
pllim opened this issue Sep 5, 2024 · 1 comment
Open

Subsets taking a long time to finalize in Cubeviz on main #3181

pllim opened this issue Sep 5, 2024 · 1 comment
Labels
bug Something isn't working cubeviz performance Performance related

Comments

@pllim
Copy link
Contributor

pllim commented Sep 5, 2024

This was #3164 by @rosteen that got accidentally deleted.

See the video below - in Cubeviz (I confirmed that Imviz is behaving normally), subsets are taking up to 5-6 seconds to finalize when drawn, which is rather annoying. I haven't had a chance to track down why this might be happening.

Screen.Recording.2024-08-22.at.12.02.20.PM.mov

I found an explanation but don't have a solution yet:

#2939 introduced subset_selected_changed_callback=self._update_extract to both the aperture and background selection menus in the spectral extraction plugin. Unfortunately, the SubsetSelect component in template_mixins.py calls subset_selected_changed_callback whenever it gets a SubsetUpdatedMessage. Whenever a subset is created, a SubsetUpdatedMessage is sent for EVERY item in the data collection, meaning the the entire spectral extraction process (via _update_extract) is getting called twice for every item in the data collection any time a subset is created. Note that this includes getting called twice for every extracted subset spectrum (including both previous subsets and the one that was just created), explaining why creating a subset gets slower and slower as you make more of them.

@pllim pllim added bug Something isn't working cubeviz performance Performance related labels Sep 5, 2024
@pllim
Copy link
Contributor Author

pllim commented Sep 5, 2024

@rosteen noted that #3175 only marginally improved the performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cubeviz performance Performance related
Projects
None yet
Development

No branches or pull requests

1 participant