-
Notifications
You must be signed in to change notification settings - Fork 753
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
Improve performance on ManyToMany chained filters #977
Conversation
After inspecting the tests I realized they are not actually running. |
Can you point out which tests aren't running? |
Hi. This isn't a performance issue. The issue is that over M2M relations, this:
is not semantically equivalent to this:
as documented in the Queries topic doc. The solution here is NOT to get involved in ORM Dark Magic™. Rather, you need to be creating a (multi-)filter that takes the (e.g. two) parameters and applies them in a single step. The addition to Django Filter for this is:
I'll leave this open for now as a reminder. |
Yikes. This looks like a huge bug in tox/detox. Those exceptions should not result in passing builds. @carltongibson - might be a good reason to enable the coverage status check? |
I would recommend that we ditch detox in favor of regular tox. Honestly, I don't think we get much from parallelizing tox. The tests are pretty fast - most of the build time is just setting up the Travis container. |
@rpkilby Are you good to make the PR for that? |
Sure. |
|
@carltongibson - I think you can close this now given the PR. |
I left this open to document the pattern and/or add a multi-parameter filter base class or such. |
Ah - thought you meant about the tox/detox thing. 👍 |
Moved documentation issue into #1020 |
I was experiencing the issue @eduardocalil reported on #745. At the time, the fix proposed by him wasnt accepted because:
I can't comment on 2, but at least 1 dont block this PR anymore. The error was caused by currently unsupported versions of DRF.