Skip to content

A one-thread task wakes the whole worker pool, 0.9 ms executing a constant query #1296

Open

Description

@zahariash

This work was produced with the help of language models.

Ladybug version

main a7e923e; 0.21.2 behaves the same.

What operating system are you using?

Ubuntu 24.04 (Linux x86_64), Ryzen 9 6900HS, 16 threads

What happened?

Every query's pipeline goes to the task queue and wakes the whole worker pool, even when the task can only use one thread. For RETURN 1 each woken worker also clones the pipeline before finding no work, and CALL threads=1 still wakes the pool.

Expected: a one-thread task runs on the thread already waiting for it. Actual: a constant query pays for a pool wake-up on every execution.

Are there known steps to reproduce?

Run RETURN 1; three times in an in-memory shell. Executing times on main are about 0.94, 0.30 and 0.20 ms (median of 8 processes); running one-thread tasks on the caller gives 0.54, 0.04 and 0.02 ms. A C API loop of RETURN 1 averages 157 us per query, 59 us with the fix.

Part of #1290. Fix in #1297.

Activity

  1. zahariash commented on Oct 18, 2026

    @zahariash
    ContributorAuthor

    I can't add sub-issues on this repository; could you set this issue's parent to #1290?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions