I think since both methods of either buffering in memory and then
writing
all bytes at once OR writing a byte at a time are both slow it makes
me
believe is the hardware. I tried the tests that you guys suggested and
the pushing files to it is slow as hell. I am assuming that means the
good
ol' card is dying - I will replace and verify but most likely that
should be it.

Thanks again guys

On May 23, 7:13 am, Mark Murphy <[email protected]> wrote:
> Agree with all the above. Er, below. What Miguel said. :-)
>
> A lot of I/O problems stem from inefficient writing algorithms (e.g.,
> byte-at-a-time).
>
> Another test you can try is using DDMS File Manager or adb push to
> write a file to the SD card. If that is similarly slow, then the
> problem may be with hardware.
>
>
>
>
>
>
>
>
>
> On Mon, May 23, 2011 at 4:09 AM, Miguel Morales <[email protected]> 
> wrote:
> > Yep that's ridiculously slow.  What are you writing to the file?  Are you
> > streaming it from the internet?  Have you tried posting the code one
> > stackoverflow?  Have you tried mounting the sdcard on your computer and
> > moving a file there to check what the time should be?
> > Try using a BufferedOutputStream to buffer some data to memory before it is
> > written to disk.
>
> > On Sun, May 22, 2011 at 9:09 PM, Zsolt Vasvari <[email protected]> wrote:
>
> >> In my app, copying a 4MB file to the SD card takes maybe 5 seconds.  I
> >> am using the Commons IO library.
>
> >> So you are doing something wrong if it takes more than a couple of
> >> seconds for a 1MB file.
>
> >> On May 23, 11:27 am, kypriakos <[email protected]> wrote:
> >> > First, good to hear from you Mark - I hope all is well!
>
> >> > Well I expected the two (instead of three) letter response - I ended
> >> > up playing around
> >> > with the code (which is nothing other than using the FileOutputStream
> >> > to write out
> >> > the jpeg. I found out that if I replace the println statements (I was
> >> > checking what was
> >> > being written out and didn't expect it to cause so much overhead) with
> >> > Log.i the
> >> > image can be written in around 95 seconds ( 1 MB). Still slow but not
> >> > as bad as an
> >> > hour. Of course still 95 seconds is a bit too much. Anything else I
> >> > can try? May be
> >> > an SD card profile / performance test would be help determine if
> >> > something is going
> >> > on there?
>
> >> > Thanks again
>
> >> > On May 21, 1:58 pm, Mark Murphy <[email protected]> wrote:
>
> >> > > On Sat, May 21, 2011 at 1:55 PM, kypriakos <[email protected]>
> >> > > wrote:
> >> > > > I am saving jpeg image on sdcard through an activity - about 1 MB
> >> > > > takes literally
> >> > > > close to an hour ... is that normal?
>
> >> > > No.
>
> >> > > --
> >> > > Mark Murphy (a Commons
> >> > > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> >> > > Android App Developer Books:http://commonsware.com/books-Hide quoted
> >> > > text -
>
> >> > - Show quoted text -
>
> >> --
> >> 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
>
> > --
> > ~ Jeremiah:9:23-24
> > Android 2D MMORPG:
> >http://solrpg.com/, http://www.youtube.com/user/revoltingx
>
> > --
> > 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
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to Android Development_ Version 3.6 Available!

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