Skip to content
This repository was archived by the owner on Feb 26, 2021. It is now read-only.
This repository was archived by the owner on Feb 26, 2021. It is now read-only.

Meeting notes 11/13/2017 #10

@divega

Description

@divega

Attendees: @anpete, @divega, @geleems, @sebastienros, @vancem

In today's meeting @vancem described an investigation the did several months ago of the TechEmpower Fortunes benchmark using SqlClient. Thanks for all the great information!

Here is a summary of his findings:

We are CPU bound. Thus it is about removing CPU overhead.

Recommendations:

  1. More efficient building of HTML string.
    Option 1) Improve StringBuilder to avoid copies.
    i. Define a StringBuilder.ForeachChunk(Func<Span>) to characters from a StringBuilder without making a large string (e.g. ToString()).
    ii. Allow StringBuilder.Append(int) to take a CultureInfo so that string writing can be done without making a string)
    Option 2) (Larger) Make a UTF8String based StringBuilder and use that. (e.g. System.Text.Primitives).

  2. (4%) There are hot locks in system.data.sqlclient
    a. (2.7%) system.data.sqlclient!System.Data.ProviderBase.DbConnectionPool.PrepareConnection
    b. (.3%) system.data.sqlclient!System.Data.SqlClient.SqlConnection+OpenAsyncRetry.Retry
    c. (.5%) system.private.corelib!System.Threading.TimerQueueTimer.Change

  3. In general optimize system.private.corelib!System.Threading.TimerQueueTimer.Change

  4. Converting to Unicode when deserializing from the database.

  5. Change benchmark to use Ordinal Sorting (today it uses culture aware)?

  6. Fix system.data.sqlclient!System.Data.ProviderBase.DbConnectionPoolIdentity.GetCurrent on windows to cache the windows identity, or to mimic what Linux does. (10%)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions