Skip to content

read methods use task.in_stream.channels_to_read, which is slow #843

@bkeryan

Description

@bkeryan

Bug Report

Profiling shows that the read methods are spending most of their time querying task.in_stream.channels_to_read.

https://github.com/ni/nidaqmx-python/pull/842/files#r2380592910

Repro or Code Sample

Run benchmarks from #842

Expected Behavior

Most of the time is spent in generated\nidaqmx_library_interpreter.py:4205(read_analog_f64)

Current Behavior

Most of the time is spent in nidaqmx\task_in_stream.py:158(channels_to_read)

Possible Solution

Use task.in_stream.num_chans

Context

Reviewing #842

Your Environment

AB#3330619

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions