mrobinson · GitHub

@mrobinson changed the title script: Optimise ScriptThreadreceivers recv loop script: Do not allocate a new timer channel for every spin of the ScriptThreadReceivers loop

May 18, 2026

mrobinson

Avoid allocating a new channel for the timer on every loop.
This loop is quite hot, and we can achieve the same effect with
select_deadline.
This is a preparation to hoisting the Selector building out of `recv()`.
This will be done in a follow-up, since the webgpu feature makes that
slightly more complex.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>

@jschwe

mrobinson

@jschwe

jschwe marked this pull request as ready for review

May 18, 2026 11:40

@jschwe

@jschwe

@jschwe

jschwe deleted the timer_and_select2 branch

May 18, 2026 12:58

Read the original on github.com ↗