1

I am writing a .NET application for Windows Mobile 6.5 (based on 3.5 CF).

I imported the wsdl and Visual Studio (2008) generated a webservice consumer, I can see the code in Reference.cs and I have a vague understanding of what it does.

The application is consuming a webservice. And I need it to be faster (customer demands). Right now a roundtrip takes about 500ms, I found the backend takes about 200ms which means my part is the bottleneck with 300ms.

Before I start trying and writing code to try things out, maybe someone else can provide the answers to these question, avoiding me a lot of trouble and work.

The webservice itself is hardly customizable, there are a few options that do not seem to have a lot of effect (URL behaviour, preauthenticate).

Upon googling I found 2 statements:

the .NET Compact Framework on Windows Mobile, JSON deserialization was literally thousands of times faster than XML deserialization due to poor performance of .NET reflection on the platform.

So that could be something. I could go for JSON, or, since the amount of operations/properties is very limited (and I do not expect a lot of changes) I could write some code to deserialize without using Reflection. The questions: can somebody validate the quote? Would not using Reflection be an answer to my optimization-question?

Thanks in advance for all your great insights and shared knowledge :-)

Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
raoel
  • 13
  • 5
  • You may go with JSON. But remeber the limitted resources available in a mobile device and the network latency, these will always be a bottleneck. Transposing high sohisticated code, ideas and modelling from desktop to mobile is never a good idea in regards of performance. Normally a mobile device should only have to use network data on startup or in background and cache all needed data locally. – josef Feb 14 '14 at 06:29
  • I am writing an application in which the "state" it should be in (which form should be in display, which input data is expected, etc) is decided on a server. The server will give me its data in each way I want, I just need to know what the most efficient way is :-) – raoel Feb 14 '14 at 09:42

0 Answers0