Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Avoid unnecessary stringifying of long lists Lists are truncated to "List (n elements)" if the stringified form is too long, but string conversion is expensive for long lists. To avoid that, we can calculate the minimum possible string length and skip stringifying if we exceed it. Based on benchmarking with the S2 image collection, this is a 10 - 20% speedup for convert_to_html. The minimum length formula takes brackets, delimiters, and whitespace into account, so e.g. the shortest possible 3-element list is 9 characters: "[1, 1, 1]". * Update changelog
- Loading branch information