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

Avoid sending any unecessary updates to the front-end and prevent hanging due to circular callbacks #325

Merged
merged 4 commits into from
Oct 13, 2022

Conversation

astrofrog
Copy link
Member

This does two things:

  • Fixes an infinite loop of callbacks in the layer options
  • Avoids sending state updates to the front-end if the serialized JSON hasn't changed

@maartenbreddels - can you think of a better way to do the second of these? (the second commit in this PR)

@astrofrog astrofrog force-pushed the reduce-frontend-updates branch from a4a7756 to 6b91f6d Compare October 11, 2022 15:57
@astrofrog astrofrog changed the title Avoid sending any unecessary updates to the front-end Avoid sending any unecessary updates to the front-end and prevent hanging due to circular callbacks Oct 11, 2022
@codecov
Copy link

codecov bot commented Oct 11, 2022

Codecov Report

Base: 89.24% // Head: 89.24% // Decreases project coverage by -0.00% ⚠️

Coverage data is based on head (6b91f6d) compared to base (2c1ccdd).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #325      +/-   ##
==========================================
- Coverage   89.24%   89.24%   -0.01%     
==========================================
  Files          86       86              
  Lines        4287     4296       +9     
==========================================
+ Hits         3826     3834       +8     
- Misses        461      462       +1     
Impacted Files Coverage Δ
glue_jupyter/state_traitlets_helpers.py 86.27% <100.00%> (+2.94%) ⬆️
glue_jupyter/widgets/layer_options.py 94.44% <100.00%> (-5.56%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@pllim
Copy link
Contributor

pllim commented Oct 12, 2022

Seems to not have broken Imviz but I also didn't try very hard.

Also seems like things are "snappier" now (e.g., the contrast/bias sliders) but I could be imagining it. I do not have numbers to back this up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants