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

[bug] API mixins and classes seem to generate unneeded queries. #256

Open
nemesifier opened this issue Jun 7, 2021 · 1 comment
Open
Assignees
Labels
bug important Release blocker

Comments

@nemesifier
Copy link
Member

The API mixins and classes added recently to openwisp-users have been based on code from openwisp-firmware-upgrader,
but while working on openwisp/openwisp-firmware-upgrader#142 to remove the code initially added to the firmware-upgrader module in favour of the new classes added to openwisp-users, I found that the number of queries increased between 2 and 3 queries for each endpoint.

This is worrying to me: I have observed something similar for many other pull requests added recently, the number of queries is skyrocketing because we are not putting effort in keeping it in check (by using assertNumQueries in the tests).
But in firmware-upgrader we did add these assertions and now 26 tests are failing.

We should understand what the additional queries are doing, if they're really needed or not or are generated by mistake and what we can do to fix it.

@ManishShah120
Copy link
Member

ManishShah120 commented Jun 23, 2021

I have summarised the reasons behind the increase in the number of queries here:- openwisp/openwisp-firmware-upgrader#142 (comment)

@pandafy pandafy added the important Release blocker label Jan 26, 2022
@pandafy pandafy added this to the Release 0.6.0 milestone Jan 26, 2022
@nemesifier nemesifier removed this from the Release 0.6.0 milestone Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug important Release blocker
Development

No branches or pull requests

3 participants