Skip to content

Limit callback requests #112

@forman

Description

@forman

Currently, chartlets.js will report any app state change to callbacks that have app state input or state channels.
See impact in xcube-dev/xcube-viewer#490.

While the issue could effectively be addressed in the host application, it is desirable to address it also in chartlets.js by invoking callbacks only, if the callback's input values have changed. An element-wise shallow comparison of a callback's current array of input values with the last one should therefore be sufficient. The memoization can hence take place on the level of individual callbacks identifable by ${contribution[i].callback[j]}.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions