aspose file tools*
The moose likes Java Micro Edition and the fly likes Why the wireless connection is so slow in J2ME Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Why the wireless connection is so slow in J2ME" Watch "Why the wireless connection is so slow in J2ME" New topic
Author

Why the wireless connection is so slow in J2ME

liang gu
Ranch Hand

Joined: Nov 05, 2001
Posts: 89
I have implemented some applications in J2ME on the Palm VIIx and Hand Spring Visor devices. I noticed that in J2ME application, the wireless connection speed is significatly slower than other non-J2ME applications on the devices(for example, the ABC News, Amazon application shipped with the device). For 600 charaters, the Palm VIIx device can take up to 1 min. to finish the download, while other application on the same device only takes a few seconds to finish the download. Does anybody experieced the same problem? Do we have any solution to it? Thanks!
Liang
Liam Quinn
Ranch Hand

Joined: Jan 18, 2002
Posts: 35
If you're reading one character at a time with InputStream.read(), you should change to reading 256 characters or so at a time with InputStream.read(byte[],int,int). Reading one character at a time is slow.
[ August 04, 2002: Message edited by: Liam Quinn ]
liang gu
Ranch Hand

Joined: Nov 05, 2001
Posts: 89
Actually I was already reading data into a 2000 bytes array, otherwise it will take forever. So my question is: even with reading data into a long bytes array, the connection speed is still significately(and painfully) slow.
 
jQuery in Action, 2nd edition
 
subject: Why the wireless connection is so slow in J2ME