Thanks Kostya, Miquel and Mark,

yes I agree, inefficient I/O algorithms would kills ya particularly
on constrained devices. I posted the one byte at at time segment
but I did try buffering data before writing it and using what Kostya
pointed out below (outS.write(data, 0, data.length). I am also
wondering
if there are other processes running that I am not aware of so I will
look into that and I think I will go ahead and mount the card to the
pc
and run some tests there. I will also swap it with another one.

Good pointers all around - thanks.

On May 23, 12:07 pm, Kostya Vasilyev <kmans...@gmail.com> wrote:
> You are writing one byte at a time.
>
> outS.write(data[i]);
>
> This is going to be incredibly slow
>
> Try this:
>
> outS.write(data, 0, data.length)
>
> or just this:
>
> outS.write(data);
>
> -- Kostya
>
> 23.05.2011 20:01, kypriakos пишет:
>
> >                    Log.i("p2pSOA","write start at "+sTime);
> >                    for (int i=0; i<data.length; i++) {
> >                            outS.write(data[i]);
> >                                    if ( (i%100000) == 0 )
> >                                            Log.i("p2pSOA","wrote "+i" of 
> > bytes");
> >                    }
>
> --
> Kostya Vasilyev --http://kmansoft.wordpress.com

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

Reply via email to