-
Apr 1st, 2011, 11:25 AM
#10
Yes I'm using M2.
FYI, I'm pretty sure that it's not a problem with the spring code base but with the commons httpcomponent library.
When I switched out the default client request factory the problem went away. However, I did find a problem with the SimpleHttpClientRequestFactory. When I used that one it seemed like every other request would fail in the emulator. But when I ran unit tests in a JVM it worked fine.
I ended up using the deprecated CommonsClientHttpRequestFactory and the problem went away.
FWIW, I think the problem is with the default host name verification algorithm in the http components library. When I did some profiling of my code in the emulator that appeared to be the bottleneck. For whatever reason, it works fine in the JVM but when you run it in the dalvik vm on an emulator (or on a device) it's super slow.
I didn't try switching out the hostname verifier but that was another option I was going to try.
You may want to rethink removing support for the http client, at least in the near future.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules