doc: some performance notes for query_range

This commit is contained in:
purarue 2024-11-22 15:58:29 -08:00
parent ad55c5c345
commit 0f9eca5722
2 changed files with 6 additions and 1 deletions

View file

@ -337,6 +337,8 @@ def select_range(
# if the user supplied a order_key, and/or we've generated an order_value, create
# the function that accesses that type on each value in the iterator
if order_key is not None or order_value is not None:
# _generate_order_valeu_func internally here creates a copy of the iterator, which has to
# be consumed in-case we're sorting by mixed types
order_by_chosen, itr = _handle_generate_order_by(itr, order_key=order_key, order_value=order_value)
# signifies that itr is empty -- can early return here
if order_by_chosen is None:
@ -398,7 +400,7 @@ Specify a type or a key to order the value by""")
return itr
# re-use items from query for testing
# reuse items from query for testing
from .query import _A, _B, _Float, _mixed_iter_errors