Skip to content

Conversation

@b-yogesh
Copy link
Collaborator

@b-yogesh b-yogesh commented Mar 11, 2025

Closes #112

This PR also closes xcube-dev/xcube-viewer#490

@b-yogesh b-yogesh requested a review from forman March 11, 2025 10:23
@codecov
Copy link

codecov bot commented Mar 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.53%. Comparing base (e18dc5c) to head (7a49490).
Report is 17 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #110      +/-   ##
==========================================
+ Coverage   89.39%   92.53%   +3.13%     
==========================================
  Files          84       85       +1     
  Lines        1443     1460      +17     
  Branches      217      220       +3     
==========================================
+ Hits         1290     1351      +61     
+ Misses        124       91      -33     
+ Partials       29       18      -11     
Flag Coverage Δ
frontend 84.13% <100.00%> (+7.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@forman forman left a comment

Choose a reason for hiding this comment

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

  • Why does this work? Please comment.
  • Global variable used instead of local memoization
  • Why time-consuming JSON conversion instead of suggested shallow comparison
  • Missing unit test

This seems to be an insufficient solution as the key used into the map of memoized values is the value serialized itself. But the key should be an ID created from the propertyRef and the value should be the array of input values.

@b-yogesh b-yogesh marked this pull request as draft March 11, 2025 11:16
@b-yogesh b-yogesh marked this pull request as ready for review March 14, 2025 08:11
@b-yogesh b-yogesh requested a review from forman March 14, 2025 08:11
@b-yogesh b-yogesh requested a review from forman March 14, 2025 15:34
@b-yogesh b-yogesh requested a review from forman March 14, 2025 16:29
@forman forman merged commit f6118e4 into main Mar 15, 2025
5 checks passed
@b-yogesh b-yogesh deleted the yogesh-xcube-viewer-490-fix-unnecessary-state-changes branch April 15, 2025 07:50
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.

Limit callback requests Unnecessary state changes reported to server endpoint

3 participants