I think that it is automatic. Just be sure to keep your HttpClient object around for as long as you're going to be using it. For example: create the HttpClient in your onCreate() and close it in onDestroy() for your activity.
On Jan 1, 10:45 pm, SizzlingSkizzorsProgrammer <cbo...@gmail.com> wrote: > Thanks a lot! Just wondering: how do you set the keep-alive > setting? I just can't seem to get it! > > Thanks for all your help! > > On Jan 1, 5:08 pm, Frank Weiss <fewe...@gmail.com> wrote: > > > > > I've seen 5 sec occasionally getting an rss feed of about 28 KB using > > java.net.URL.openConnection().getInputStream() and then parsing it with > > SAXParser. It looks like you're doing a POST to send form data(?) so you may > > have to stick with HTTPClient. > > > If you're doing frequent requests, you can probably take advantage of > > HTTPClient's "keep-alive" connection management. > > > If you're looking for optimizations, I strongly suggest you create a test > > app which performs the same request you're having performance problems with. > > Collect more data, such as the size of the request and response. Try the > > same request from a different platform (like your laptop or desktop). > > Compare the network paths between the desktop and Android to the server. > > > I know you'd like to just get an answer "do this/try this". I hope that by > > looking into the problem in more detail you''ll find a solution. > > > On Fri, Jan 1, 2010 at 3:36 PM, SizzlingSkizzorsProgrammer <cbo...@gmail.com > > > > wrote: > > > About 5 seconds, which isn't unbearable, but considering my app needs > > > frequent requests some kind of optimization must be possible. > > > > Look at the android market...it seems to load everything pretty fast > > > (much faster than my app at least!) > > > > On Jan 1, 3:15 pm, Frank Weiss <fewe...@gmail.com> wrote: > > > > Considering that the execute method's latency includes network and > > > > server > > > > times, on what basis do you think it's taking too long? What latency are > > > you > > > > observing, less than one second, more than one minute? > > > > > On Fri, Jan 1, 2010 at 1:19 PM, SizzlingSkizzorsProgrammer < > > > cbo...@gmail.com > > > > > > wrote: > > > > > Yes, I've tried logging and the HTTP execute definitely takes the > > > > > largest chunk of time, but how can I speed it up? Is there another > > > > > protocol/method? > > > > > > On Dec 31 2009, 6:07 pm, jotobjects <jotobje...@gmail.com> wrote: > > > > > > On Dec 31, 12:52 pm, SizzlingSkizzorsProgrammer <cbo...@gmail.com> > > > > > > wrote: > > > > > > > > It works fine, but it's quite slow...any way to make it faster? > > > > > > > A guess would be that the HTTP network speed is 100's of times > > > > > > slower > > > > > > than all the rest of the code. You might log the time before and > > > after > > > > > > the execute method if you haven't already done that. > > > > > > -- > > > > > You received this message because you are subscribed to the Google > > > > > Groups "Android Developers" group. > > > > > To post to this group, send email to > > > android-developers@googlegroups.com > > > > > To unsubscribe from this group, send email to > > > > > android-developers+unsubscr...@googlegroups.com<android-developers%2Bunsubs > > > > > cr...@googlegroups.com><android-developers%2Bunsubs > > > cr...@googlegroups.com> > > > > > For more options, visit this group at > > > > >http://groups.google.com/group/android-developers?hl=en > > > > -- > > > You received this message because you are subscribed to the Google > > > Groups "Android Developers" group. > > > To post to this group, send email to android-developers@googlegroups.com > > > To unsubscribe from this group, send email to > > > android-developers+unsubscr...@googlegroups.com<android-developers%2Bunsubs > > > cr...@googlegroups.com> > > > For more options, visit this group at > > >http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en