tags:

views:

44

answers:

1

I am working on performance tuning a web service. I am using a trial of JetBrains to profile the application. When I import a file, 15% of the execution time is going toward GetCurrentContextInfo, here's the signature:

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

These function calls are supposedly coming from my query 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 pooling. I can't figure out where it is getting the GetCurrentContextInfo - I can't find a reference to it in my solution.

What is this function, and if it's unnecessary, how can I get rid of it or limit the time it uses?

+1  A: 

We came across a very similar problem while debugging a polling web call using ANTS Performance Profiler, except with ours the problem was much more serious (90% of execution time was being spent here).

After some investigation we found it was the ADODB code that was causing this call to GetCurrentContextInfo. As it was the only place in our code using the ADODB connector we moved over to the MySqlConnector/NET. This drastically improved the performance of our call. Hopefully this helps.

whudson05