Make the /users API more efficient
Currently, it seems like the /users/ API doesn't propagate the pagination parameters to the database and will read all user records from the database even when count=0&page=1
is specified in the REST API.
This makes the list users page very slow because pagination setup itself will call the API with count=0&page=1
to create the total number of pages.
Ideally, the count and page should be passed down to the database layer (as offset
and limit
) in the Query parameters instead of fetching everything and filtering in Python.