fixtures.reorder_items performs poorly for large numbers of parametrized fixtures #3107
Labels
Comments
GitMate.io thinks the contributor most likely able to help you is @RonnyPfannschmidt. |
thanks for doing all the things in a very detail oriented manner, for personal reasons i wont be able to give it the time it deserves until next week |
For anyone who arrived here from the changelog, the fix for this landed in #3108. |
Thanks @edmorley! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If a parametrized fixture generates n items, then reorder_items will have roughly O(n^2) performance. Slice items is called for each item and then iterates over the list of items to find matching groups. We can improve this by pre-caching items by fixture (like argkeys_cache but in reverse).
I've already got code ready for a pull request, I'm just making this issue for record-keeping / discussion.
The text was updated successfully, but these errors were encountered: