• C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

Performance problem with .NET Interop

Joined
12/10/09
Messages
7
Points
11
Hello guys

Im trying to make a system, in C# .NET, that distribute market data to Excel sheets using RTD function.
But Im 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:

C++:
[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:

C++:
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:

C++:
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

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

Thanks Guys
 
Back
Top