Azure / azure-cosmos-table-dotnet

.NET SDK for Azure Cosmos Table API
14 stars 6 forks source link

BufferManager support must be re-introduced in Table API 1.0.6 #38

Open IngarSaltvik opened 4 years ago

IngarSaltvik commented 4 years ago

We have tried moving from Microsoft.WindowsAzure.Storage to Microsoft.Azure.Cosmos.Table, but hit some major performance obstacles in the process. This is currently a blocker for us.

After disabling client tracing (see issue see reported issue) we are still seeing a ~25% degradation in performance. From the Azure profiler traces, time is mainly spent in array allocation inside Microsoft.Azure.Cosmos.Table.RestExecutor.Utils.AsyncStreamCopier.StartCopyStreamAsyncHelper().

I have compared the disassembled IL from the Table library and the legacy API, and found that the Table library always allocates new arrays, while the legacy libraries uses a buffer manager to reuse buffers. I also found that the BufferManager setter has been removed from the CloudTableClient class in the new Table library, as compared to the WindowsAzure.Storage library.

I have two requests for getting the Table SDK on par with the legacy storage API:

  1. Re-introduce the OperationContext.DefaultLogLevel property, to make it possible to control the trace log level.
  2. Re-introduce support for BufferManager in the CloudTableClient.