none
Performance problem with .NET Interop RRS feed

  • Question

  • Hello guys

    I´m trying to make a system, in C# .NET, that distribute market data to Excel sheets using RTD function.
    But I´m having performance problems to fire events to RTD.

    When i fire about 900 events per second, the processor usage go to 100%, and this is very strange

    This the COM Interop Interface code:

    Code:
    [Guid("6027F32B-9360-4615-9EFC-A6043806E64A")]
    [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
    public interface BovespaEvents
    {
        void UpdateNotify(string strategyname, string symbolname, string fieldname, float fieldvalue);
    }
    This is the method that I use the COM Interop Interface:

    Code:
    public void UpdateEvent(DataObject sender)
    {
    try
        {
            UpdateNotify(sender.strategy, sender.symbol, sender.field, sender.value);
        }
        catch (Exception err)
        {
            LogError("UpdateEvent", err.Message);
            if (err.InnerException != null)
            {
                LogError("UpdateEvent", err.InnerException.Message);
            }
        }
    }
    And this is the DataObject class:

    Code:
    public class DataObject
    {
        public string strategy;
        public string symbol;
        public string field;
        public float value;
    
        ~DataObject()
        { 
        }
    }
    And I make an VB6 to consume this events, it could be a RTD

    Code:
    Private Sub myInteropClient_UpdateNotify(ByVal strategyname As String, ByVal symbolname As String, ByVal fieldname As String, ByVal fieldvalue As Single)
    '
    ' code here
    '
    End Sub
    I´m stuck in this performance problem. Does anybody already see this problem before ?

    Thanks Guys
    <!-- / message -->
    Monday, December 21, 2009 12:58 PM

Answers