Minor change to reduce churn in parse_save_field(). It currently calls PyList_Append(self->fields, field); Py_DECREF(field) for every field of every row. PyList_Append internally does Py_NewRef(newitem), so each field pays an incref immediately followed by a decref, plus a critical-section enter/exit.
Since the reference is already about to be dropped, just pass the reference directly to the caller.
(PR is written & ready to attach)
Linked PRs
Minor change to reduce churn in
parse_save_field(). It currently callsPyList_Append(self->fields, field); Py_DECREF(field)for every field of every row.PyList_Appendinternally doesPy_NewRef(newitem), so each field pays an incref immediately followed by a decref, plus a critical-section enter/exit.Since the reference is already about to be dropped, just pass the reference directly to the caller.
(PR is written & ready to attach)
Linked PRs