Currently we extract field name via fieldName() call, which returns a c-string. With this we lose size information for the field name and have to calculate again when passing to methods that take name as StringData. Calling fieldNameStringData() allows us to avoid duplicated efforts.
As part of this work, we should also consider removing the BSONElement::fieldName() method entirely.
- related to
-
SERVER-27846 Improve performance of the update path's $push sort
- Backlog