doc: some performance notes for query_range (#409)
* doc: some performance notes for query_range * add ruff_cache to gitignore
This commit is contained in:
parent
a7f05c2cad
commit
95a16b956f
4 changed files with 27 additions and 16 deletions
|
@ -538,6 +538,9 @@ def query_hpi_functions(
|
|||
# chain list of functions from user, in the order they wrote them on the CLI
|
||||
input_src = chain(*(f() for f in _locate_functions_or_prompt(qualified_names)))
|
||||
|
||||
# NOTE: if passing just one function to this which returns a single namedtuple/dataclass,
|
||||
# using both --order-key and --order-type will often be faster as it does not need to
|
||||
# duplicate the iterator in memory, or try to find the --order-type type on each object before sorting
|
||||
res = select_range(
|
||||
input_src,
|
||||
order_key=order_key,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue