RoleManager.setRoles() is a very expensive operation, which requires a full round trip to the DB every time it is called to define the roles for the curren connection. @WithRoles is used liberally within the codebase, and is often called multiple times within the same transaction.
This unnecessary frequent calling adds an overhead to processing new datapoints
For this following upload, setRoles() utilized 35.62% of cpu time
Describe the bug
RoleManager.setRoles()
is a very expensive operation, which requires a full round trip to the DB every time it is called to define the roles for the curren connection.@WithRoles
is used liberally within the codebase, and is often called multiple times within the same transaction.This unnecessary frequent calling adds an overhead to processing new datapoints
For this following upload,
setRoles()
utilized 35.62% of cpu time