Skip to content

Refactor-out usages of Stencil's "readTask" #10348

@maxpatiiuk

Description

@maxpatiiuk

Description

In 3 files, Calcite uses Stencil's readTask() function.

Could you check if there was a particular reason readTask was used or was it just a performance micro optimization?

Lit's default re-render scheduling is very simple - they don't provide readTask/writeTask. However, they expose hook for customizing the scheduling, letting you implement your own alternatives of Stencil's readTask/writeTask if it is important to have them.

Stencil's readTask/writeTask is a smart performance optimization, but it's hardly used - no usages at Esri outside of Calcite, and Calcite has only 3 usages.

TODO:

  • check if readTask() is needed
  • if not, refactor out it's usages

Proposed Advantages

Compatibility with Lit's default scheduling system

Which Component

3 files:

Relevant Info

No response

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-angular
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/eslint-plugin-calcite-components

Metadata

Metadata

Labels

4 - verifiedIssues that have been tested, confirmed as mitigated, and are ready to close.calcite-componentsIssues specific to the @esri/calcite-components package.estimate - 2Small fix or update, may require updates to tests.p - mediumIssue is non core or affecting less that 60% of people using the libraryrefactorIssues tied to code that needs to be significantly reworked.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions