Reduce memory allocations in GCS client
This removes some unnecessary transient allocations from the GCS client code, by passing pointers to data directly to the JSON parsing library, rather than copying all of the JSON data to a temporary 'string' object. Also converted some unnecessarily-general comparisons against Json::Value::null to calls to Value::isNull(). Also changes several parameters from "const string&" to "const char*", in order to avoid unnecessary intermediate allocations. Json::Value::get() has an overload which takes "const char*". Ideally, the JSON library would use string_view or StringPiece, but that's an open source project and so modifying that dependency is out of scope for this change. PiperOrigin-RevId: 181693172
Loading
Please sign in to comment