PDA (WinCE 4.1) <---data---> WebService = low speed of data transf

G

Guest

I'm transferring DataSet (for example) over 100 Mb LAN from WebService to PDA (WinCE 4.1 + Compact Framework SP2), and i see that it takes about 2-3 seconds to transfer 4K of DataSet data. DataSet is small - it's contains schema and 1 datarow. This is not problems of LAN, and this is not problems of WebService - i called WS functions from PC and it takes less then a second

How i can improve perfomance of PDA? and that is the reason of delay?

P.S. - sorry for my english :)
 
N

Neil Cowburn [MVP]

One way to increase the performance of Web services when calling them from a
..NET Compact Framework application is to make a dummy call to the Web
service prior to making the real call. This will then ensure that all the
under-the-hood stuff (like JIT compiling, connection caching, etc) is
already done when you come to make the real call in your application.

Typically, I always add a method to my Web services called Dummy which
accepts no parameters and I call this Web service method in my Form Load
event handler. This significantly improves the user experience for my
applications.

--Neil
 
I

Ilya Tumanov [MS]

Parsing XML schema is quite expensive and every time you transmit, say, 1
byte of data in the DataSet, schema will be parsed and loaded.
That might take many times longer than to actually transmit 1 byte. As
amount of data increases, schema parsing becomes irrelevant.
For transferring DataSet's XML of about 1 MB (~1000 records with 25-30
columns of various types) you could expect a call to take 25-30 seconds
plus transfer time on slow connection.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
Thread-Topic: PDA (WinCE 4.1) <---data---> WebService = low speed of data tr
thread-index: AcRjWUpe8qAX8nExSFaMXg+sPn2wPA==
X-WBNR-Posting-Host: 212.176.219.194
From: "=?Utf-8?B?TWFnaWNNYXg=?=" <[email protected]>
References: <[email protected]>
Subject: Re: PDA (WinCE 4.1) <---data---> WebService = low speed of data tr
Date: Tue, 6 Jul 2004 06:01:02 -0700
Lines: 64
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.compactframework
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 127.0.0.1
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.compactframework:56676
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

thanks for answer!
But I already use same dummy method, as you advised... I wrote some testes:
1st step - Dummy Method called
2nd step - 100 times cycled call of method, that returns about 8K of text
from WebService (just for test - string of "0" - 8000 times multiplied :) )
This test takes about 52 seconds...

Second Test:
1st step - Dummy Method called
2nd step - 100 times cycled call of method, that returns DataSet
(contains schema - 1 table + 1 datarow - data comes from Sql Server 2000)
from WebService, data transmitted to WebService - small XmlDocument (about
100 bytes)
This test takes about 347 (!!!!) seconds...

3rd Test:
1st step - Dummy Method called
2nd step - 100 times cycled call of method, that returns converted to
string Dataset (contains schema - 1 table + 1 datarow - about 2K of text -
data comes from Sql Server 2000) from WebService, and no data transmitted
to WebService
This test takes about 85 seconds...

And Last test:
1st step - Dummy Method called
2nd step - 100 times cycled call of method, that returns same Dataset,
but as Dataset object type, not as string (contains schema - 1 table + 1
datarow - about 2K of text - data comes from Sql Server 2000) from
WebService, and no data transmitted to WebService
 
G

Guest

That's right, but it works MUCH faster in PC (not in Compact Framework) - one operation takes less than a second (when i transmited DataSet object from WebService to Client Program)! It seems like bug of Compact Framework...

"Ilya Tumanov [MS]" said:
Parsing XML schema is quite expensive and every time you transmit, say, 1
byte of data in the DataSet, schema will be parsed and loaded.
That might take many times longer than to actually transmit 1 byte. As
amount of data increases, schema parsing becomes irrelevant.
For transferring DataSet's XML of about 1 MB (~1000 records with 25-30
columns of various types) you could expect a call to take 25-30 seconds
plus transfer time on slow connection.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
Thread-Topic: PDA (WinCE 4.1) <---data---> WebService = low speed of data tr
thread-index: AcRjWUpe8qAX8nExSFaMXg+sPn2wPA==
X-WBNR-Posting-Host: 212.176.219.194
From: "=?Utf-8?B?TWFnaWNNYXg=?=" <[email protected]>
References: <[email protected]>
Subject: Re: PDA (WinCE 4.1) <---data---> WebService = low speed of data tr
Date: Tue, 6 Jul 2004 06:01:02 -0700
Lines: 64
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.compactframework
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 127.0.0.1
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.compactframework:56676
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

thanks for answer!
But I already use same dummy method, as you advised... I wrote some testes:
1st step - Dummy Method called
2nd step - 100 times cycled call of method, that returns about 8K of text
from WebService (just for test - string of "0" - 8000 times multiplied :) )
This test takes about 52 seconds...

Second Test:
1st step - Dummy Method called
2nd step - 100 times cycled call of method, that returns DataSet
(contains schema - 1 table + 1 datarow - data comes from Sql Server 2000)
from WebService, data transmitted to WebService - small XmlDocument (about
100 bytes)
This test takes about 347 (!!!!) seconds...

3rd Test:
1st step - Dummy Method called
2nd step - 100 times cycled call of method, that returns converted to
string Dataset (contains schema - 1 table + 1 datarow - about 2K of text -
data comes from Sql Server 2000) from WebService, and no data transmitted
to WebService
This test takes about 85 seconds...

And Last test:
1st step - Dummy Method called
2nd step - 100 times cycled call of method, that returns same Dataset,
but as Dataset object type, not as string (contains schema - 1 table + 1
datarow - about 2K of text - data comes from Sql Server 2000) from
WebService, and no data transmitted to WebService
This test takes about 355 (!!!!!!!!!!) seconds...

Any ideas? As i see - time growed then i transmit serialized objects...
 
I

Ilya Tumanov [MS]

It's not a secret - highly optimized JIT on a desktop might be WAY faster
than CF's tiny one (all other things equal).
The difference is especially noticeable on iJIT (all platforms but ARM).
However if your device can not accommodate desktop's OS and framework,
there's no point to compare as desktop's framework won't run.

So, it's not a bug but rather a price to pay for ease of development and
compatibility.

We do realize the price is high, and we are working on improving
performance.
CF V2 will get improved JIT which would provide better performance.
Don't expect it to be as fast as desktop, though.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
Thread-Topic: PDA (WinCE 4.1) <---data---> WebService = low speed of data tr
thread-index: AcRj6VHO29O4JmzURTWX5W9Ol6nvvQ==
X-WBNR-Posting-Host: 212.176.219.194
From: "=?Utf-8?B?TWFnaWNNYXg=?=" <[email protected]>
References: <[email protected]>
<ecVIp#[email protected]>
Subject: Re: PDA (WinCE 4.1) <---data---> WebService = low speed of data tr
Date: Tue, 6 Jul 2004 23:12:02 -0700
Lines: 132
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.compactframework
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 127.0.0.1
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.compactframework:56741
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

That's right, but it works MUCH faster in PC (not in Compact Framework) -
one operation takes less than a second (when i transmited DataSet object
from WebService to Client Program)! It seems like bug of Compact
Framework...
"Ilya Tumanov [MS]" said:
Parsing XML schema is quite expensive and every time you transmit, say, 1
byte of data in the DataSet, schema will be parsed and loaded.
That might take many times longer than to actually transmit 1 byte. As
amount of data increases, schema parsing becomes irrelevant.
For transferring DataSet's XML of about 1 MB (~1000 records with 25-30
columns of various types) you could expect a call to take 25-30 seconds
plus transfer time on slow connection.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
Thread-Topic: PDA (WinCE 4.1) <---data---> WebService = low speed of
data
tr
thread-index: AcRjWUpe8qAX8nExSFaMXg+sPn2wPA==
X-WBNR-Posting-Host: 212.176.219.194
From: "=?Utf-8?B?TWFnaWNNYXg=?=" <[email protected]>
References: <[email protected]>
Subject: Re: PDA (WinCE 4.1) <---data---> WebService = low speed of
data
tr
Date: Tue, 6 Jul 2004 06:01:02 -0700
Lines: 64
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.compactframework
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 127.0.0.1
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.compactframework:56676
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

thanks for answer!
But I already use same dummy method, as you advised... I wrote some testes:
1st step - Dummy Method called
2nd step - 100 times cycled call of method, that returns about 8K of
text
from WebService (just for test - string of "0" - 8000 times multiplied :) )
This test takes about 52 seconds...

Second Test:
1st step - Dummy Method called
2nd step - 100 times cycled call of method, that returns DataSet
(contains schema - 1 table + 1 datarow - data comes from Sql Server 2000)
from WebService, data transmitted to WebService - small XmlDocument (about
100 bytes)
This test takes about 347 (!!!!) seconds...

3rd Test:
1st step - Dummy Method called
2nd step - 100 times cycled call of method, that returns converted to
string Dataset (contains schema - 1 table + 1 datarow - about 2K of text -
data comes from Sql Server 2000) from WebService, and no data transmitted
to WebService
This test takes about 85 seconds...

And Last test:
1st step - Dummy Method called
2nd step - 100 times cycled call of method, that returns same
Dataset,
but as Dataset object type, not as string (contains schema - 1 table + 1
datarow - about 2K of text - data comes from Sql Server 2000) from
WebService, and no data transmitted to WebService
This test takes about 355 (!!!!!!!!!!) seconds...

Any ideas? As i see - time growed then i transmit serialized objects...


:

One way to increase the performance of Web services when calling
them
from a
..NET Compact Framework application is to make a dummy call to the Web
service prior to making the real call. This will then ensure that
all
the
under-the-hood stuff (like JIT compiling, connection caching, etc) is
already done when you come to make the real call in your application.

Typically, I always add a method to my Web services called Dummy which
accepts no parameters and I call this Web service method in my Form Load
event handler. This significantly improves the user experience for my
applications.

--Neil

--
Neil Cowburn, MVP
Co-Founder, OpenNETCF.org

WWW: www.opennetcf.org



I'm transferring DataSet (for example) over 100 Mb LAN from WebService to
PDA (WinCE 4.1 + Compact Framework SP2), and i see that it takes about 2-3
seconds to transfer 4K of DataSet data. DataSet is small - it's contains
schema and 1 datarow. This is not problems of LAN, and this is not
problems of WebService - i called WS functions from PC and it
takes
less
then a second

How i can improve perfomance of PDA? and that is the reason of delay?

P.S. - sorry for my english :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top