Just made a discovery, somewhat by accident, and thought that I'd pass along what I found, in case someone else gets bitten by this.
I use an Kingston 8GB SpeedGrade 4 uSDHC card. For close to the last year, I have been pounding away at that card. Have written literally thousands of files, varying from a few bytes to 25Meg. A couple of times, my software "ran away" and created 9999 named zero-length files. The library I use is FatFs.
For the last 6 months or so, I have been having real problems with file writes that run far too long (at one point, they occasionally took over 300ms for a 256 byte block). This has caused no end of grief. This was in a device that sleeps, then is awakened every 250ms to do its "thing". 300ms was a total killer. I was sure it had something to do with the software because my previous product that uses the same spec uSD card had no such problems.
Just a few days ago, I was chatting with an EE friend about a variety of problems we have shared. I happened to mention this particular problem. He asked whether or not I had tried a different card?
So, just as a trial, when I got home, I tried a reformat. I had reformatted the card several times, but it was just a generic reformat. I decided to use the software tool provided by the SD card association. It offers the generic format and an option that "clears" every byte on the card. The latter took around 15 minutes and that is what I used.
When I put the card in the instrument, the "normal" write time for a 256 byte block dropped from around 26ms to around 3ms. And, at least during the test time with the logic analyzer, there were NO long writes!