• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
BLOBs, MySQL, hex. Oh my
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

BLOBs, MySQL, hex. Oh my


  • Subject: BLOBs, MySQL, hex. Oh my
  • From: Ben Einstein <email@hidden>
  • Date: Wed, 7 May 2008 20:16:43 -0400

Hi All,

I have an enterprise DB application that once used DO to move some files around (images and zip files, mostly). After some serious testing and lots of reading, I decided to move this to a few different BLOB fields in the database. Despite major warnings from people, I've found that images work great (specifically, NSData/NSImage). I can notice a very minor speed drop a few milliseconds, but being able to drop DO and it's woes is completely worth it.

Unfortunately, I didn't quite test the zip files, figuring it would be the same. I'm using Serge Cohen's MCPKit (aka SMySQL), which has a nifty little function to convert NSData to a MySQL-legal NSString. On the other end, someone on the Apple list posted a few lines of code to bump returned data into it's original NSData object. With the zip files (no larger then 600kb) that method takes 30 - 40 seconds to run. On an image of a similar size, it takes 0.1 seconds on a slow day.

Does anyone know why this would be? Is there an easy way to get around this? I suppose my understating of hex is lacking, but I always thought a hex string was a hex string was a hex string; length was all that mattered.

Thanks,
Ben Einstein
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: BLOBs, MySQL, hex. Oh my
      • From: Serge Cohen <email@hidden>
    • Re: BLOBs, MySQL, hex. Oh my
      • From: Serge Cohen <email@hidden>
    • Re: BLOBs, MySQL, hex. Oh my
      • From: Jens Alfke <email@hidden>
    • Re: BLOBs, MySQL, hex. Oh my
      • From: John Stiles <email@hidden>
  • Prev by Date: Re: Keys dependent on NSArrayController's selection
  • Next by Date: Re: BLOBs, MySQL, hex. Oh my
  • Previous by thread: Re: Keys dependent on NSArrayController's selection
  • Next by thread: Re: BLOBs, MySQL, hex. Oh my
  • Index(es):
    • Date
    • Thread