Re: Socket API performance diff. between Sp2k2 and 2k3
From: Omar [MS] (omarm_at_online.microsoft.com)
Date: 09/21/04
- Previous message: Mateusz Łoskot: "Re: GPS phone pocketpc development"
- In reply to: Daniel: "Re: Socket API performance diff. between Sp2k2 and 2k3"
- Next in thread: Daniel: "Re: Socket API performance diff. between Sp2k2 and 2k3"
- Reply: Daniel: "Re: Socket API performance diff. between Sp2k2 and 2k3"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 20 Sep 2004 19:08:17 -0700
If you call recv once with the anticipated size it'll in general be faster
than calling recv twice, once to get the size and then to get the data.
Similarly if you didn't use select before calling recv things you'd save
another system call. However, neither of these would I think should affect
your throughput that much. Unfortunately since you haven't really specified
what your thoroughput is, it is hard to say.
Also you didn't quite answer my question about the speed of Pocket IE, I was
asking whether its thoroughput matched what you were seeing on your app's.
As for the implementation of WinInet on sp2002 and sp2003, for both it is
implemented on top of the Sockets API, so I'd conclude that your the wininet
api uses the sockets api more efficiently than your app.
Thanks,
- Omar
-- This posting is provided "AS IS" with no warranties, and confers no rights. Please do not send email directly to this alias. This alias is for newsgroup purposes only. "Daniel" <Daniel@discussions.microsoft.com> wrote in message news:CD0E9438-9DE2-4C0D-BF40-563B1FAFCB2C@microsoft.com... > Do you mean the TCP buffer? If so, I haven't checked. The allocated buffers, > however, gets as big has the packages. We are using selects to see when data > is available. When it is available, first we receive an unsigned int with the > package size and then the whole package size 7 kB when it is file data. > > Yes, the speed of Pocket IE seems to be the same on both sp2002 and 2003 - > which made me think that the WinInet API is better implemented than Socket > API on the Sp2002. > > "Omar [MS]" wrote: > > > What is the recv buffer size when you are calling recv? Are you using > > selects or just regular blocking recv's. > > You can try changing your recv buffer size larger and smaller and see if > > that makes a difference. > > > > The speed of PocketIE--is it as fast as your sp2003 data rate or your sp2002 > > recv data rate? > > > > Thanks, > > - Omar > > > > -- > > This posting is provided "AS IS" with no warranties, and confers no rights. > > Please do not send > > email directly to this alias. This alias is for newsgroup purposes only. > > > > > > > > "Daniel" <Daniel@discussions.microsoft.com> wrote in message > > news:553BB453-ADCD-4B21-B778-FD418747C5D4@microsoft.com... > > > I posted this question a couple of weeks ago in the > > > smartphone.developer-forum but with no luck, so I thought I would try here > > > with the network experts instead. :-) > > > > > > I'm writing an application that uses the Socket API to send and receive > > data > > > over Internet. When testing the application on both a Smartphone 2002 and > > a > > > Smartphone 2003 (Motorola Mpx-200, Qtek 8080) I notice that when > > downloading > > > a file the Sp2002 only receives data at half the speed of the Sp2003. The > > > package size on the file chunks is about 7 kB. > > > > > > At first, I thought it was OS-related, but then I tried downloading a 100 > > kB > > > file with Pocket IE - this resulted in the same download speed on both > > > devices! > > > > > > So, on Sp2002, is there any known performance differences when comparing > > the > > > Socket API and WinInet API? > > > > > > If not, any other ideas on what might be the difference? I use the exact > > > same code on both platforms and I've spent some time investigating what > > makes > > > the Sp2002 slower (I mean, I guess there aren't many ways one can > > implement > > > a simple socket-receive in), but with no result so far. I should mention > > that > > > the speed > > > difference occurs on both GPRS and when connecting using the cradle and > > > active sync. Also, it doesn't matter if I write the data to disk or not - > > so > > > it has nothing to do with if I write the data to flash or not. > > > > > > Any input is appreciated. Thanks! > > > > > > Best regards, > > > Daniel > > > > > >
- Previous message: Mateusz Łoskot: "Re: GPS phone pocketpc development"
- In reply to: Daniel: "Re: Socket API performance diff. between Sp2k2 and 2k3"
- Next in thread: Daniel: "Re: Socket API performance diff. between Sp2k2 and 2k3"
- Reply: Daniel: "Re: Socket API performance diff. between Sp2k2 and 2k3"
- Messages sorted by: [ date ] [ thread ]