my app is downlading data from web (via httpclient and httpresponse):

                HttpEntity resEntity = response.getEntity();
                FileOutputStream fos = new FileOutputStream(getFile());
                InputStream in = resEntity.getContent();

                long len1 = 0;
                long len = len1;

                byte[] buffer = new byte[87380];

                while ((len1 = in.read(buffer)) != -1) {
                        fos.write(buffer, 0, (int) len1);
                        len += len1;
                }

                fos.close();

                if (resEntity.getContentLength() != len) {
                        file.delete();
                        file = null;
                }

And this is show via top (adb shell):

  PID CPU% S  #THR     VSS     RSS PCY UID      Name
   24  83% R     1      0K      0K  fg root     mmcqd

I think is mmcqd who is writen to sdcard.img via emulator, but why use
so much cpu?
any help to down cpu-usage??

and when i download 2+ files.... 90+% !!!!! (for that i use a queue)

thanks.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe, reply using "remove me" as the subject.

Reply via email to