Skip to content

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

Open
@nemesifier

Description

@nemesifier

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions