Click here to Skip to main content
15,905,028 members
Home / Discussions / C#
   

C#

 
GeneralQuestion about Interop with a DLL written in C++ Pin
kmansari19-Oct-04 10:23
kmansari19-Oct-04 10:23 
GeneralRe: Question about Interop with a DLL written in C++ Pin
Heath Stewart19-Oct-04 16:02
protectorHeath Stewart19-Oct-04 16:02 
GeneralRe: Question about Interop with a DLL written in C++ Pin
kmansari20-Oct-04 10:02
kmansari20-Oct-04 10:02 
GeneralRe: Question about Interop with a DLL written in C++ Pin
kmansari20-Oct-04 10:24
kmansari20-Oct-04 10:24 
GeneralRe: Question about Interop with a DLL written in C++ Pin
Heath Stewart20-Oct-04 13:37
protectorHeath Stewart20-Oct-04 13:37 
Generalmessaging in C# Pin
ppp00119-Oct-04 10:01
ppp00119-Oct-04 10:01 
GeneralRe: messaging in C# Pin
Heath Stewart19-Oct-04 15:46
protectorHeath Stewart19-Oct-04 15:46 
GeneralThreading -- Performance Pin
petst19-Oct-04 9:42
petst19-Oct-04 9:42 
Hi all,

An interresting problem in the context of interprocess communication. Consider following code:

<br />
public void StartSepThread()<br />
{<br />
    ThreadStart tsThread = new ThreadStart(RunServerSepThread);<br />
    TestThread = new Thread(tsThread);<br />
    TestThread.Name = "IPC.Test";<br />
    TestThread.Start();<br />
}<br />
public void RunServerSepThread()<br />
{<br />
    while(true)<br />
    {<br />
        (lot of code here...)<br />
    }<br />
}<br />


The code above proves to be 50% less performant than following code:

<br />
public void RunServerSameThread()<br />
{<br />
    while(true)<br />
    {<br />
        (exact same code here...)<br />
    }<br />
}<br />


When running the server in the same thread, we are able to move 163 Mbit/sec of data between two running processes. However, when running the same code as a seperate thread, performance goes down by almost 35% to a level of 111 Mbit/sec.

Anybody any idea what this might be???

Thanks
GeneralRe: Threading -- Performance Pin
Salil Khedkar19-Oct-04 20:47
Salil Khedkar19-Oct-04 20:47 
GeneralRe: Threading -- Performance Pin
petst20-Oct-04 4:28
petst20-Oct-04 4:28 
GeneralSpecifying number of digits after decimal in a fixed-point formatted string Pin
DTWC_Lawrence19-Oct-04 9:40
DTWC_Lawrence19-Oct-04 9:40 
GeneralRe: Specifying number of digits after decimal in a fixed-point formatted string Pin
Alex A. Miller19-Oct-04 9:57
Alex A. Miller19-Oct-04 9:57 
GeneralRe: Specifying number of digits after decimal in a fixed-point formatted string Pin
DTWC_Lawrence19-Oct-04 10:02
DTWC_Lawrence19-Oct-04 10:02 
GeneralRe: Specifying number of digits after decimal in a fixed-point formatted string Pin
Salil Khedkar19-Oct-04 21:17
Salil Khedkar19-Oct-04 21:17 
GeneralShrinking Toolbar images Pin
LannieK19-Oct-04 9:24
LannieK19-Oct-04 9:24 
GeneralRe: Shrinking Toolbar images Pin
Heath Stewart19-Oct-04 11:21
protectorHeath Stewart19-Oct-04 11:21 
GeneralRe: Shrinking Toolbar images Pin
LannieK20-Oct-04 2:23
LannieK20-Oct-04 2:23 
GeneralRe: Shrinking Toolbar images Pin
Heath Stewart20-Oct-04 5:20
protectorHeath Stewart20-Oct-04 5:20 
GeneralRe: Shrinking Toolbar images Pin
LannieK20-Oct-04 10:03
LannieK20-Oct-04 10:03 
General32 bit integer from sbyte array Pin
BrcKcc19-Oct-04 9:03
BrcKcc19-Oct-04 9:03 
GeneralRe: 32 bit integer from sbyte array Pin
Dies19-Oct-04 9:38
Dies19-Oct-04 9:38 
GeneralRe: 32 bit integer from sbyte array Pin
Christian Graus19-Oct-04 9:41
protectorChristian Graus19-Oct-04 9:41 
GeneralMSMQ in C# Pin
ppp00119-Oct-04 9:00
ppp00119-Oct-04 9:00 
GeneralRe: MSMQ in C# Pin
Heath Stewart19-Oct-04 11:17
protectorHeath Stewart19-Oct-04 11:17 
GeneralMCE SDK 2005 problem Pin
Oguz Mazlum19-Oct-04 7:48
Oguz Mazlum19-Oct-04 7:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.