Skip to content

Refactor/element prop transformation performance - #855

Merged
michielvandergeest merged 7 commits into
devfrom
refactor/element-prop-transformation-performance
Dec 4, 2026
Merged

michielvandergeest merged 7 commits into
devfrom
refactor/element-prop-transformation-performance

Conversation

@michielvandergeest

Copy link
Copy Markdown
Collaborator

The implementation of the props transformer in element.js was not optimal because it was creating more (temporary) objects than needed.

This refactor addresses that and should lead to less memory usage and higher performance (exact numbers tbc)

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

Test Results: ✅ PASSED

Passed: 1,885 · Failed: 0 · Total: 1,885 assertions

View workflow run · 2026-12-02 09:04:42 UTC

@suresh-gangumalla

Copy link
Copy Markdown
Collaborator

Profiler stats for “element.populate”, using create-element benchmark to stress the element’s populate method, and following are the results between dev and candidate,

Base (dev)
  calls:   600000
  totalMs: 5308.43
  avgMs:   0.0088
  maxMs:   15.5200

Candidate (working tree)
  calls:   600000
  totalMs: 3759.61
  avgMs:   0.0063
  maxMs:   16.0400

Improvement (base -> candidate):
  avg ms/call:   -29.2% (candidate faster)
  total ms:      -29.2% (candidate faster)

@suresh-gangumalla

Copy link
Copy Markdown
Collaborator

Profiler stats for “element.set”  using  computed-binding-updates benchmark to stress the element’s set function,

Base (dev)
  calls:   1262000
  totalMs: 4841.47
  avgMs:   0.0038
  maxMs:   6.9350

Candidate (working tree)
  calls:   1262000
  totalMs: 3298.85
  avgMs:   0.0026
  maxMs:   9.9150

Improvement (base -> candidate):
  avg ms/call:   -31.9% (candidate faster)
  total ms:      -31.9% (candidate faster)

@suresh-gangumalla
suresh-gangumalla self-requested a review December 4, 2026 09:05

@suresh-gangumalla suresh-gangumalla left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@michielvandergeest
michielvandergeest merged commit dd6e1e3 into dev Dec 4, 2026
2 checks passed
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.

2 participants