Switch to interpreted delegates for one-off invocations

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Unknown
    • 3.10.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • Dotnet Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      In a few places we generate, compile and invoke a lambda to obtain a constant value but do so just as a one-shot.

      This is inefficient and we can consider using "preferInterpreted:true" on the .Compile method of these lambda expressions in order to use a fast interpreter instead of JIT'ing and executing.

      As well as potentially solving CSHARP-6087 this should help with performance and long-running memory usage scenarios:

      https://github.com/dotnet/efcore/pull/29815 is where they did this to the EF provider.

            Assignee:
            Damien Guard
            Reporter:
            Damien Guard
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: