What is LicenseInteropHelper.getCurrentContextInfo and why does it use so many loops of my .net application?

I am working on tuning the performance of a web service. I am using a trial version of JetBrains to profile the application. When I import the file, 15% of the runtime goes to GetCurrentContextInfo, here is the signature:

Void System.ComponentModel.LicenseManager.LicenseInteropHelper.GetCurrentContextInfo(Int32 &, IntPtr &, RuntimeTypeHandle)

These function calls are supposedly coming from my request function:

Public Function query(ByVal sql As String) As ADODB.Recordset
    Try
        Dim conn As ADODB.Connection
        Dim rs As New ADODB.Recordset
        conn = curConnection()
        rs.Open(sql, conn, ADODB.CursorTypeEnum.adOpenStatic, ADODB.LockTypeEnum.adLockReadOnly)
        Return rs
    Catch ex As System.Runtime.InteropServices.COMException
        handleDatabaseError(ex)
    End Try
End Function

The curConnection () function is a connection pool. I cannot understand where it gets GetCurrentContextInfo - I cannot find a link to it in my solution.

What is this function, and if it is not needed, how can I get rid of it or limit the time of its use?

+3
source share
1 answer

- ANTS Performance Profiler, , ( 90% ).

, ADODB GetCurrentContextInfo. ADODB, MySqlConnector/NET. . , .

+3

Source: https://habr.com/ru/post/1730954/


All Articles