Phones in general do not have super fast CPUs like laptop and desktops.
Android runs on a phone CPU which is not very fast. Overall you will see
that programs dont necessarily run at the same speed as on a laptop.
- Sunit Katkar
http://sunitkatkar.blogspot.com/ - Android OS Tutorials



On Fri, Nov 21, 2008 at 8:08 PM, ______ <[EMAIL PROTECTED]> wrote:

>
> I measure the speed of copying files to/from the SD card at about 5MB/
> sec on my G1, however the following speed test tops out at about 250kB/
> sec read and 125kB/sec write.  (The example shown writes to the
> internal SD card, but writing to the removable card is about the same
> speed.) Why is it so slow?  (Using NIO channels to write whole arrays
> of bytes doesn't speed it up by much...)
>
> --
>
> long startTime = System.currentTimeMillis();
> BufferedOutputStream writer = new BufferedOutputStream(openFileOutput
> ("speedtest", MODE_PRIVATE));
> int size = 1000000;
> for (int i = 0; i < size; i++)
>        writer.write((byte) 0);
> writer.close();
> Log.i("speedtest", "speed test a: " + (System.currentTimeMillis() -
> startTime));
> startTime = System.currentTimeMillis();
>
> BufferedInputStream in = new BufferedInputStream(openFileInput
> ("speedtest"));
> for (int i = 0; i < size; i++)
>        in.read();
> in.close();
>
> Log.i("speedtest", "speed test b: " + (System.currentTimeMillis() -
> startTime));
> startTime = System.currentTimeMillis();
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to