Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixtures.reorder_items performs poorly for large numbers of parametrized fixtures #3107

Closed
cheezman34 opened this issue Jan 11, 2018 · 4 comments
Closed

Comments

@cheezman34
Copy link

@cheezman34 cheezman34 commented Jan 11, 2018

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.

@pytestbot
Copy link
Contributor

@pytestbot pytestbot commented Jan 11, 2018

GitMate.io thinks the contributor most likely able to help you is @RonnyPfannschmidt.

@RonnyPfannschmidt
Copy link
Member

@RonnyPfannschmidt RonnyPfannschmidt commented Jan 11, 2018

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

@edmorley
Copy link

@edmorley edmorley commented Jan 31, 2018

For anyone who arrived here from the changelog, the fix for this landed in #3108.
(This issue can now be closed)

@nicoddemus
Copy link
Member

@nicoddemus nicoddemus commented Jan 31, 2018

Thanks @edmorley!

@nicoddemus nicoddemus closed this Jan 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.