|
While profiling for invisible sharding performance, I noticed a few small things that can be improved in the router command path that likely won't move the needle but are simple to do:
- TrackingMetadata initializes an OID for every request, which increments an atomic, but doesn't use it unless tracking verbosity is on and the command uses a ShardRemote.
- Getting the connection string from a Shard type returns a copy and is used pretty often.
- The bulk write path maintains a map of written opTimes from ConnectionString to opTime, which is never used.
|