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

Disable scatter viewer density map image broadcast when not visible #467

Merged
merged 2 commits into from
Aug 30, 2024

Conversation

kecnry
Copy link
Contributor

@kecnry kecnry commented Aug 26, 2024

This PR prevents glue from broadcasting a large binary image for scatter viewers when the density map is not in use.

This still needs testing to ensure that density maps still continue to function as designed.

@dhomeier dhomeier added bug Something isn't working bqplot-viewers performance labels Aug 26, 2024
Copy link

codecov bot commented Aug 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.07%. Comparing base (93005e7) to head (54499a8).
Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #467   +/-   ##
=======================================
  Coverage   86.06%   86.07%           
=======================================
  Files          90       90           
  Lines        5240     5242    +2     
=======================================
+ Hits         4510     4512    +2     
  Misses        730      730           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dhomeier
Copy link
Contributor

dhomeier commented Aug 27, 2024

I have tested this with the examples shown in #353 and found similar problems to the original issue, namely the density map not reappearing automatically when the show points switch is turned off and then back on again:
density_map-toggled
density_map-modified

density_mark.visible is immediately set to True when show points is, but density_mark.image appears to remain set to EMPTY_IMAGE until some other update is triggering _update_rendered_image, like changing contrast, or sometimes accessing some other property of the layer (the latter not very reproducibly).
But we probably need an extra _update_rendered_image on changes to points_mode, and the same for switching from Markers.

@dhomeier dhomeier changed the title disable density map image broadcast Disable scatter viewer density map image broadcast when not visible Aug 27, 2024
@dhomeier
Copy link
Contributor

@astrofrog the last commit resolves the initialisation in both density map and auto mode. If you have time for a quick check, I think this is ready to merge today.

@astrofrog astrofrog merged commit 5ef073a into glue-viz:main Aug 30, 2024
26 checks passed
@kecnry kecnry deleted the tst-density-map-no-msg branch August 30, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants