KamoCRM

Stop recomputing rights on every navigation; take pushed changes

Performancekamo-internal
Shipped
November 14, 2026 at 9:13 PM UTC
Author
Kamo
Commit
0faf88b

Rights are computed once and live in the ***, so moving around the site should never re-check them. It did: every useUserInfo mount (400 files) made a background /api/user-info read, and that route POSTed /api/security/session/refresh on every call, which ran the full rights waterfall from the database. That was one recompute per page navigation, per lazily mounted row and popover, and two per 5-minute tick. - /api/user-info is a Redis GET. ?refresh=1 recomputes (first load of a tab only); ?primary=1 reads the master after a known rewrite. - userInfoStore: a later mount reads nothing. The tick recomputes once (was twice). Tab focus is throttled to once a minute. - SessionRightsListener (AuthedChrome) subscribes to **************** SecurityService re-mints the member's sessions after any committed rights change and MediaService relays the signal, so new rights show up at once with no sign-out. A socket reconnect re-reads in case a frame was missed.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing