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

improve initial scatter/mouseover performance #137

Merged
merged 7 commits into from
Sep 5, 2024

Conversation

kecnry
Copy link
Member

@kecnry kecnry commented Aug 30, 2024

This along with glue-viz/glue-jupyter#467 (included in glue-jupyter 0.22.2) improves the performance at load time, especially when the server is remote.

Note that lcviz does not explicitly pin glue-jupyter (it pulls in glue-jupyter through jdaviz).

@kecnry kecnry added this to the 0.4.3 milestone Aug 30, 2024
@kecnry kecnry force-pushed the mouseover-performance branch from 4b91d54 to 6702dd7 Compare August 30, 2024 13:12
Copy link

codecov bot commented Aug 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.20%. Comparing base (7b78df5) to head (6702dd7).
Report is 49 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #137      +/-   ##
==========================================
- Coverage   93.92%   91.20%   -2.73%     
==========================================
  Files          37       41       +4     
  Lines        1598     2148     +550     
==========================================
+ Hits         1501     1959     +458     
- Misses         97      189      +92     

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

@@ -149,6 +149,7 @@ def _apply_layer_defaults(self, layer_state):
if getattr(layer_state.layer, 'meta', {}).get('Plugin', None) == 'Binning':
# increased size of binned results, by default
layer_state.size = 5
layer_state.points_mode = 'markers'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isn't needed in order to get the improvements from glue-jupyter, but doesn't hurt! If we ever have light curves with enough points where the scatter with markers becomes more expensive than the density plot, we can consider removing this to leave it at the default of 'auto'.

# glue-jupyter 1.18 changed from lyr.scatter to lyr.scatter_mark
# TODO: once glue-jupyter is pinned to 1.18 or later, update this to:
# scatter = lyr.scatter_mark
scatter = getattr(lyr, 'scatter_mark', getattr(lyr, 'scatter', None))
scatter = lyr.scatter_mark
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lcviz currently requires jdaviz 3.10, which in turn requires glue-jupyter 0.20+ (original comment was a typo glue-jupyter made this change in 0.18, not 1.18, with glue-viz/glue-jupyter#363)

@kecnry kecnry changed the title improve initial performance improve initial scatter/mouseover performance Aug 30, 2024
@kecnry kecnry marked this pull request as ready for review August 30, 2024 13:55
@kecnry kecnry requested a review from bmorris3 August 30, 2024 13:55
@kecnry kecnry merged commit a4c5868 into spacetelescope:main Sep 5, 2024
12 of 13 checks passed
meeseeksmachine pushed a commit to meeseeksmachine/lcviz that referenced this pull request Sep 5, 2024
@kecnry kecnry deleted the mouseover-performance branch September 5, 2024 13:12
kecnry added a commit that referenced this pull request Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant