[ https://issues.apache.org/jira/browse/THRIFT-2567?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Vogt resolved THRIFT-2567. --------------------------------- Resolution: Fixed After debugging a while now the performance is the same for the simple TCP server and thrift server :( (Both around 20ms for 12MB over localhost) Its not fast, but its consistent now. > 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 > > 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)