Skip to content

phoenixframework/phoenix_live_view

Back Optimize stream set accumulation in dynamicToBuffer (#4420)

Commit details

Optimize stream set accumulation in dynamicToBuffer (#4420)

Description

Mutate the streams Set in-place with for..of instead of creating intermediate spread arrays and a new Set instance. This reduces GC churn and speeds up stream collection by ~2.1x.

Metadata

Author
Barna Kovacs barna.kovacs@tutanota.com
Committed
Commit

Contributors

  • Barna Kovacs barna.kovacs@tutanota.com Author