Slow write to sqlite on usb sticks

Kay C Lan lan.kc.macmail at gmail.com
Thu Apr 26 04:55:34 EDT 2012


Hi Terry,

Strange you should raise this as I was just wondering myself why SD cards
are so slow when they have no mechanical parts. You don't mention if the HD
you were using was internal or external, but on my own system I get the
following benchmarks:

Internal HD - 99 MB/s
External eSATA (via cardbus adapter) - 81 MB/s
External FW800 - 58 MB/s
Exernal FW400 - 32 MB/s *
External USB 2.0 - 26 MB/s *
SD Card (via card bus adaptor) - 11 MB/s

* same HD, same enclosure, dual port.

I've seen a youTube video (so it must be true;-) which showed a benchtest
between a USB stick and an SD card and the USB stick was about 1 MB/s
slower. I don't have a usb stick to benchtest, but because of the video,
when I bought my last SD card it was the fasted I could find - they have a
speed rating which I can't recall right now.

The above is not accurate because to be a true test of bus interface speed
the HD should be the same, and in this case I've used 3 different HDs, 1 x
Internal, 1 x eSATA & FW800, and the last one in a dual port enclosure.

I believe though that it gives a ball park figure of what you can expect,
and so anacdotally a USB stick is about 10 times slower than an internal
HD. This doesn't fully explain your performance drop, but I believe it
explains a good portion of it.

It also explains why downloading photos off the SD card takes soooooo
loooooonnnnggggggggg......

I still don't understand why though.... there are no moving parts?

On Thu, Apr 26, 2012 at 9:57 AM, Terry Judd <terry.judd at unimelb.edu.au>wrote:

> We're finding that it's very slow to write even small amounts of data from
> Livecode to a sqlite file when the Livecode app and the db file are on a
> usb stick (the db stores a local copy of the user's messages as they are
> downloaded from a server). It seems to be something that is peculiar to the
> usb setup as it works very quickly when run from a hard drive (less that 1
> second for 40 messages vs 20-30 seconds on the usb stick). Has anyone
> experienced anything similar and/or does anyone have any suggestions as to
> how we might speed the process up?
>
> I'm currently downloading the messages (as xml), converting them to an
> array (from, to, subject, body, attachments etc.) and then writing each to
> the sqlite db within a repeat loop and then closing the db connection.
>
> Terry...
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list