Hi Folks,
I've got an application which continually downloads data from a server. It tries to make a new download about once every second. Sometimes it comes through just fine, and I get a new download every few seconds. Other times it takes forever to get a download. The download is only about 250 characters, so what 250K? 500K? Not very big. My signal is reading EDGE (capital letters), and usually between -77 and -88 db. Not great, but not that bad. Anyone ever had this kind of problem?
Of course when I run the application through the device simulator (with the MDS simulator), the http is all over the wire, so the http downloads come very quickly all the time.
I've noticed that if I try to download smaller "dumps", like 100 characters, it does come more quickly, but still goes through really slow periods where nothing downloads for like 5 or 10 minutes at a time. (Again, trying every 1 second, or 5 seconds or so). And if I try big old downloads, like 60K characters sometimes it will go almost an hour without successfully downloading. So the size of my download is certainly a factor, but I'm just amazed at how SLOW it is sometimes even for the little ones.
I can browse to google or yahoo or whatever via the browser even during these big old delays. Granted it takes 5 to 30 seconds some times, but still gets there.
I am running the http data downloads as a background thread. But I've tried it from the GUI part of the App and it doesn't seem to make any difference. I've tried changing the sleep time from anywhere 100 (milisecs) to 50,000 (milisecs): little if any difference. I've also tried changing the thread priority from Min to Normal to Max. No noticable difference.
It seems that if I "Turn Wireless Off" and then "Turn Wireless On". It sometimes seems to give the application a kick in the pants and I start getting downloads more frequently. However this doesn't always work. Also, I've tried resetting, and turning off then on the BB (since I have the http part running as a background thread "Auto-run on startup"). Similar results: sometimes gets things going faster, sometimes not. It almost seems like the OS or the Application seems to get bored with downloading http "dumps" and needs to be occasionally reminded (he he he).
Any ideas? Anyone know of any existing threads I could read to get some ideas?
Thank you