`async_scope::spawn` cost a lot in ref counting and heap alloc, how to optimize?

Open
#1,748 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp
Domain
performance

Research direction

No files or tests are named. Begin by examining the implementation and usage of async_scope::spawn, then measure the reference-counting and heap-allocation costs for senders with unique schedulers. Done would require an agreed optimization or workaround, with evidence that it addresses the reported hot-path cost.

Written by the indexing model from the issue text.

Description

Hi everyone, I'm using async_scope::spawn in a very hot code path. And I find it's very slow due to the reference counting and heap allocation.

the senders I'm spawning have different scheduelrs(unique scheudler per sender). So ex::bulk doesn't apply here.

I wonder is there any way to optimize or workaround?

can anyone help me? thanks in advance!

Dominant language
C++
Stars
2.4k
Forks
270
Avg merge
2d 17h
Merged PRs (30d)
37

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NVIDIA/stdexec

All issues in NVIDIA/stdexec

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.