Comments (5)
Hi @AndriySvyryd ,
What is the use case for this?
from azure-cosmos-dotnet-v3.
- Consistency with other API like
CreateItemStreamAsync
- Control over how the parameters are serialized without having to replace
CosmosJsonSerializer
- Writing to the stream directly is more efficient than going through an object first
from azure-cosmos-dotnet-v3.
The other APIs were done for performance reasons. With query the SDK does a lot of logic to figure out what partition to go to, and how to combine/sort the results for queries when the results are from multiple partitions. Since this logic is done in the SDK it would end up deserializing the stream that was just created, and would actually hurt the performance.
from azure-cosmos-dotnet-v3.
We did some testing on a fairly large data (ended up with 100+ physical partitions). Cross partition query parts de-serialized on a client for ORDER-BY merge purposes required a lot of CPU + garbage, causing as a result GC to not be able to clean all used JSON serialization primitives leading to filling all the memory in addition to high CPU. This feature supposed to allow ORDER-BY query parts to be processed on client without complete de-serialization of query parts from partitions. Is my understanding correct here?
from azure-cosmos-dotnet-v3.
@vladrai the original post was about taking a stream as a input. The issue you are reporting is around how the SDK handles responses which has recently been completely overhauled to improve this scenario. The SDK now only lazily deserializes the fields that are need instead of the entire object. Please take a look at the following PRs for more information.
Please tryout the latest 3.0.0.9-Preview which should have all the changes.
from azure-cosmos-dotnet-v3.
Related Issues (20)
- What is the stream needed for or how is it used in `PatchItemStreamAsync`? HOT 2
- Microsoft.Azure.Cosmos.Encryption.Custom 1.0.0-preview06 is incompatible with Cosmos 3.40.0-preview.0 and newer
- Change Feed / Processor: AVAD timeToLiveExpired deserialization Issue
- LINQ support for specifying FilterPredicate
- Clarification on versioning practices of preview packages HOT 1
- Session-level consistency across multiple SDK clients/across different processes HOT 2
- Add New Zealand North region in Public Contract
- CosmosClientOptions.Request is not respected. HOT 5
- TelemetrySpan is not failures are not reflected in-case of non-exceptions
- Benchmark using not releasing
- invalid syntax for GetDatabase - closing paren is shown as closing square bracket HOT 1
- ReadManyItemsAsync -> ReadManyTaskHelperAsync wraps forked IO task into Task.Run
- AggregateException (instead of CosmosException) being thrown on GetFeedRanges when Gateway fails HOT 11
- Add client option to use the System.Text.Json Serializer instead of Newtonsoft ... HOT 2
- DiagnosticSourceName seems to be "Azure.Cosmos" not "Azure.Cosmos.Operation" in stable version SDK HOT 5
- Default JasonDotNet serializer maxdepth HOT 1
- Inquiry on Implementing Custom Retry Logic with CosmosClient HOT 1
- Blazor WebAssembly Hangs When Initializing CosmosClient Due to Task.Run in SystemUsageMonitor
- Operation 'POST' on resource 'dbs' is not allowed through Azure Cosmos DB endpoint. Please switch on such operations for your account, or perform this operation through Azure Resource Manager, Azure Portal, Azure CLI or Azure Powershell HOT 6
- Distributed Tracing/Open Telemetry: Feature requests HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-cosmos-dotnet-v3.