-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Emerson Clarke wrote: | modified the api to ensure that each thread was given its own sqlite3 * | structure.
I would assume that the actual indexing is the expensive part since it involves a lot of I/O (SQLite page size is 1KB). Why don't you do this with worker threads (better on Windows) or worker processes (better on Unix)? Have a queue object that filenames to index are put into. Then have each worker thread or worker process take a filename from the queue, do whatever work it is they need to do and put their results into a result queue. You can have one thread then taking those results from the result queue and doing a commit every n results or n seconds. It is possible for multiple connections in the same thread to share a cache as well as having multiple queries in progress. See http://sqlite.org/capi3ref.html#sqlite3_enable_shared_cache and http://www.sqlite.org/sharedcache.html Roger -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFFk2o0mOOfHg372QQRAid0AJ0Xq6pMsbpCMZVr7dBUEPrElhwtAQCeI3aR AcoNPTAv0C9kdEXuNJio28I= =gQr8 -----END PGP SIGNATURE----- ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------