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:
purarue 2024-11-26 13:53:10 -08:00 committed by GitHub
parent a7f05c2cad
commit 95a16b956f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 27 additions and 16 deletions

View file

@ -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,