Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 1) If I remove the long HTML string from the dictionary blob, and place it into a text column instead (the blob would be much smaller in this case, all the other data in the dictionary are fairly short strings/arrays of strings), do you think this would help significantly? 2) While putting all db transactions in a thread would keep my UI thread from blocking, it would not actually help shorten the actual transaction time (in fact, it would probably get worse, since I'd need to manage and pass messages between threads). This is something I want to avoid if at all possible. Commented Mar 16, 2010 at 2:41
  • I do think that it would be faster to put the HTML strings in a text column. I've done the same thing in a program I've been working on, and the insert completes much faster than yours does. Give it a try. I'd love to hear how it works out for you. You are right to say that putting the work in a separate thread won't speed up the process, but it will certainly improve the responsiveness of the UI, which is incredibly important. Commented Mar 16, 2010 at 5:23
  • I intend to do that, thanks. I plan to a) shrink my dictionary by discarding data I don't need to store, and b) split my dictionary into text/varchars at storage time and reassemble it when i need it... ill still need for some blobs for a couple of arrays contained within my dictionary, but theyre far far smaller than the huge html string that occupies most of the dictionary's space. hopefully, this will improve things. Commented Mar 16, 2010 at 8:28
  • Would calling NSInvocationOperation be okay so long as I open a new connection each time I want to carry out a transaction? Particularly, I'm probably going to carry out deletes and inserts/updates with NSInvocationOperation, fire and forget. Selects...are another matter I'll have to deal with seperately, since I actually need the results after the operation is finished. Commented Mar 16, 2010 at 11:31
  • It should work, but be careful not to access the database more than once from different threads. If you do try to create two or more connections to the database at the same time, your application will crash. Commented Mar 16, 2010 at 12:49