• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MIDP Performance Test

 
Aamir Chaudhry
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey guys,
i've performed some tests by using Palm, MIDP HttpConnection and XML. The Size of transmitted XML data was 1024 bytes. Results are;
-> Average Connection Time = 6 sec
-> Average InputStream Read Time = 84 sec
-> Average Read Time if kXML(wb) is used = 24 sec
-> Average Parsing Time = 2.4 sec
it all makes it abt 1 min and 32 sec for one request. i'm just wonderin' that it's really slow n time consumin'. i've seen other wireless Apps who are very fast...
-> are these timings good in wireless J2ME Apps or there shud be less time?
-> What shud be the time in Ideal case and what is the ideal case?
-> how can i improve the performance by reducin' these timings?
quick response wud be much appreciated.
Aamir
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13077
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Those are ghastly times, it should be much faster. Which XML parser are you using? What is the hardware?
Bill
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How did you do the test? On a emulator or on a real device? I have done kXML parsing extensively on Palm/MIDP and it was never longer than 1 sec or so. So, I agree with Bill: The performance numbers you quote are abnormal.
 
Aamir Chaudhry
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well i have performed those tests with both nanoXML and kXML on REAL Palm VIIx Handheld, and i'm using Palm.Net wireless Service. While using nanoXML Read Time was 84 sec and with kXML(wap binary), it was 24 sec. Parsing time is kinda same for both parsers. Also, only Connection setup is taking abt 5 sec............
yeah i do agree that it's ghastly times, that's what i was wonderin' too. So wud you plz tell me, how can i improve this performance?
Aamir
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe your network is SLOW? I do not know. I never used Palm.NET (expensive). Maybe you could try other type of networks (e.g. simulate a TCP/IP network from the serial line) and see if it improves.
Can you make your program to write a timestamp as a RMS record when it finished downloading data etc.? Just try to time each step and find whether it is really the *parsing* that takes this long ...
 
Aamir Chaudhry
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Michael, if you see the very 1st message, i posted, you will come to know that the Average Parsing time is abt 2.4 sec and Data Downloading(Reading from Stream) is actually taking too much time.
Could you plz guide me how to "Simulate a TCP/IP network from Serial Line?" Also is there any Wireless Network Provider other than Palm.Net which i can use for better performance?
Thanks
Aamir
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, it was not clear to me what you meant by "read time" and how you had measured them from your 1st message. But anyway, I still feel suspicious that Palm.NET needs 84 seconds to download 1024 BYTES data. That is like 0.1 kbps. Other applications on Palm.NET obviously have much more acceptable performance. Maybe you can check whether it is your server that is responding very slowly?
Anyway, this link
http://www.deepwave.net/ref/palm-net/
teaches you how to set up Palm PPP network over the serial line for both Windows and Linux hosts.
 
Aamir Chaudhry
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Micheal thanks for your response. By "Read Time" i mean "Time it takes to read the Data from Input Stream" and i measured that time by capturing the time b4 calling Read method and time when it ends Reading i.e. EOF, then difference of these two times is the "Read Time".
Read Time = (Time when EOF occurs) - (Time b4 calling Read method)
Also, i've tested it by simulating TCP/IP Serial Line, and the Read Time(Download Time) was abt 1.5 sec instead of 84 sec. As you said that it might be the Server which is respondin' slow, and that makes sense to me as well. Could you please tell me, is there any 3rd party Server(s) where i can deploy my servlet to conclude this performace issue?
Aamir
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the speed is OK when you connect through serial PPP, the server must function OK. So, it must be problems with the Palm.NET connection. I do not know what it is since I have never used it ...
 
Aamir Chaudhry
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey u know what? i got it runnin' very fast , now it takes only 1/2 sec to download 1024 bytes instead of 84 sec.
The reason was, when you read byte by byte it takes tooo long i.e. 84 sec But if you read in chunk of bytes like 1024, it just takes 1/2 sec, this is kinda weired thu, bcus there shudn't be soo much difference. but neways, finally, i got it
cheers,
Aamir
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But I still do not get it. I wrote programs that do byte by byte read and they work just fine. Maybe your device (or underlying network) is not buffering the IO stream? Notice that your performance improved when you use PPP-over-serial ...
Anyway, maybe it is a Palm.NET thing. But it is very good know. Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic