Skip to content
Prev Previous commit
Next Next commit
gh-152721: Clarify the batch-list comment
Reword per review: the list is built with append per element, not
pre-sized; note the old alloc(count - i) + trim per batch was O(count^2).
  • Loading branch information
tonghuaroot committed Jul 2, 2026
commit beb5980422b91f9ce36e1342f912d01e2d3063cd
2 changes: 1 addition & 1 deletion Modules/_remote_debugging/binary_io_reader.c
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@ binary_reader_replay(BinaryReader *reader, PyObject *collector, PyObject *progre
return -1;
}
}
/* Exact-size the list; alloc+trim is O(count^2). */
/* Append per element; the old alloc(count - i) + trim per batch was O(count^2). */
Comment thread
pablogsal marked this conversation as resolved.
Outdated
timestamps_list = PyList_New(0);
if (!timestamps_list) {
return -1;
Expand Down
Loading