Skip to content

Excessive overhead using named tuples and other row cursors #457

@dvarrazzo

Description

@dvarrazzo

Row factories using the fields names (such as dict_row, namedtuple_row) use cur.description to get the fields name. This call has a heavy overhead, because it does much more than getting the fields names.

These calls can be optimized. See image for the gains obtained.

image

Note: this is a pretty tight micro-benchmark, not an indication of the scale of the speedup improvement in a complete program.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions