[ 
https://issues.apache.org/jira/browse/THRIFT-2567?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Vogt updated THRIFT-2567:
--------------------------------

    Attachment: Server.cs
                Client.cs

An addition:

Using this with mono/linux the same application transfers
the 12MB not in 12ms but in 2ms :)
(Unfortunately the application has to run under windows)
Hm. Maybe I should debug a bit more, to have at least the 
same performance as in linux.


> Csharp slow ?
> -------------
>
>                 Key: THRIFT-2567
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2567
>             Project: Thrift
>          Issue Type: Question
>          Components: C# - Library
>    Affects Versions: 1.0
>            Reporter: Martin Vogt
>            Priority: Minor
>         Attachments: Client.cs, Server.cs
>
>
> Hello,
> I have a simple csharp server/client for performance tests,
> something like this
> {quote}
> service {
>  binary getData();
> }
> {quote}
> which returns a 1MB buffer.(git snapshot from a few days ago).
> A thrift call client->server takes 8ms
> according to stopWatch.Elapsed. The same client->server 
> implemented from here(modified  of course):
> {quote}
> http://www.java2s.com/Code/CSharp/Network/SimpleTcpClient.htm
> http://www.java2s.com/Code/CSharp/Network/SimpleTcpServer.htm
> {quote}
> takes ~1ms. (Factor 8 faster, than the thrift client/server, all localhost
> connections on windows)
> I tried to narrow it down where the actual problem is, but without
> luck so far.
> - Its not the binary stream creation during unmarshall:
> {quote}
> // pseudocode
>  byte[] getData() {
>   len=iprot.readi32()
>   byte[] x=new byte[len]
>   iprot.readAll(x,len);
>  return x;
> }
> {quote}
>  
> It _looks_ that its in the thrift c# library classes (TSocket,etc..),
> but up to now I haven't found an explanation for the  
> differences.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to