Details
-
Task
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
-
None
-
MXS-SPRINT-227, MXS-SPRINT-228
Description
This has always been inefficient but now with MXS-5037 fixed, the Service::status() is used even for single-level services when used with readconnroute. This causes a thread-local variable to be accessed every time a query is routed which shows up in profiling.
The solution to this would be to move the status bits into mxs::Target which would also allow inlining of the status checks. The status updates should then be done in a manner where the base class status is updated but the updating action is handled by the derived class. For servers, this is simply an assignment to the status variable but for services the status must be recursively calculated. Given that status changes are very rare but status checks are extremely frequent, this is worth optimizing for.