Azure-cosmos-dotnet-v3: Fire and forget

Created on 7 Feb 2020  路  8Comments  路  Source: Azure/azure-cosmos-dotnet-v3

When you are creating or upserting large documents the performance is... not great. One avoidable cause is these APIs always return the created object. So if I upload a 100k doc, I get a download of 100k. And I throw it away. There should be a way to prevent azure from return the created doc. This will increase performance and decrease data egress costs.

discussion-wanted feature

Most helpful comment

@pentp and @jbt00000 please check out the PR

All 8 comments

@kirankumarkolli ?

It wold be a nice feature to have. Guess Its a gap on service side.
@j82w please check with service crew.

@jbt00000 the feature is in the roadmap for the service. Once it's available we will create a PR to add a request option flag to enable it. Thanks for the suggestion.

That's great! It will help all loading scenarios.

This is blocking our migration from V2 to V3 (similar situation to #1266).
We have no need for the reflected document object from the response and the <T> type is often abstract (which fails on deserialization).
It's also bad for performance, so I would really like to have an option to have the ItemResponse.Resource be lazy initialized/optional. Ideally, this should be configurable on CosmosClientOptions also (as a default).

Additionally, this should apply to DeleteItemAsync<T> also.

@pentp and @jbt00000 please check out the PR

@pentp and @jbt00000 3.9.0-preview3 is released

I'm excited and will test over the weekend.

Next up, compression?!?!

Was this page helpful?
0 / 5 - 0 ratings