问题
Im trying to continuously send small UDP-packets (8 byte) as fast as possible from a Samsung Omnia 7 with Windows Phone 7.1 Beta2 refresh (Mango) to a standard PC with Windows 7 and I get very erratic performance.
The weirdest thing is that I get the best performance when sending one message per around 1-4 milliseconds. If I send messages faster (< 1 ms) or slower (> 4 ms) I get strange freezings where the packages seem to get stuck (for 0.5-1 sec every ~0.5 sec) somewhere before they get released again in a burst.
Another weird observation is that the sending phone-app still seem to send the messages continuously. It is as if the freezings arise outside the app, perhaps in the network-device on the phone (?). But why is a 1-4 ms delay between the messages optimal? Why do I get more of these freezings when sending messages with a lower rate (5-50 ms)?
(When sending from the emulator I get good performance.)
Update
Im kind of giving this up for now. Perhaps it works better in the final release of WP7.1. He who waits shall see.
回答1:
There appears to be an issue with sending UDP data on WP7. See this MS Connect issue log
http://connect.microsoft.com/VisualStudio/feedback/details/690198/poor-udp-performance-in-windows-phone-7-mango
来源:https://stackoverflow.com/questions/6930977/poor-udp-performance-with-windows-phone-7-1-mango