pub struct list_users;Expand description
GET /api/v1/users Une PAGE d’utilisateurs, filtrable (SuperAdmin only).
── Ce que cette route faisait, et ce que ça coûtait ──────────────────────
Elle appelait list_all() : aucune borne, aucun PageRequest. Mesuré le
2026-09-18 sur la recette, avec le même jeton et à la suite :
GET /organizations 6 190 octets 18,8 ms (paginée la veille)
GET /users 2 399 187 octets 667,0 ms (table entière, 4 120 lignes)Un facteur 387 en volume. Le pire est que OrganizationDetail.svelte:86
demandait déjà ?page=1&per_page=200 — le composant croyait paginer, le
serveur ignorait les deux paramètres. C’est le motif exact de #943, et il
vivait encore ici.
Sur un vrai parc, un syndic de quelques milliers de copropriétaires recevait 2,4 Mo à chaque ouverture de l’écran. Sur un téléphone en 4G, ce n’est pas lent : c’est inutilisable.
La clé data ne bouge pas — les appelants qui la lisent continuent de
fonctionner — et pagination s’y ajoute, avec le total. C’est ce total
qui permet à l’appelant de savoir qu’il ne voit qu’un fragment, au lieu de
le deviner (#953).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for list_users
impl RefUnwindSafe for list_users
impl Send for list_users
impl Sync for list_users
impl Unpin for list_users
impl UnsafeUnpin for list_users
impl UnwindSafe for list_users
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Fake for T
impl<T> Fake for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more