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 <zvasv...@gmail.com> 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 <demet...@ece.neu.edu> 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 <mmur...@commonsware.com> wrote:
> >
> >
> >
> > > On Sat, May 21, 2011 at 1:55 PM, kypriakos <demet...@ece.neu.edu>
> 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 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
>



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