Skip to content

[C++] Modify BackgroundGenerator so it creates fewer threads #27921

@asfimport

Description

@asfimport

The current implementation creates a thread per block and in the CSV reader this hurts performance just a bit.  However, in the IPC reader this hurts performance even more.

Instead the readahead can move inside the background generator and the background generator task can keep running until the queue fills up and then restart when the queue has drained enough for a substantial amount of work to be done.

In my test CSV case this dropped the # of thread tasks created from ~2.5k to ~100.

Reporter: Weston Pace / @westonpace
Assignee: Weston Pace / @westonpace

PRs and other links:

Note: This issue was originally created as ARROW-12097. Please see the migration documentation for further details.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions