diff --git a/CHANGELOG b/CHANGELOG index 828a9afe8..4ba14c540 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -14,6 +14,8 @@ For a complete change history, see the SVN log. Mapnik Trunk ------------ +- SQLite Plugin: optimize io using shared cache and no mutexes (#797) + - Directly link input plugins to libmapnik to avoid having to set dlopen flags from binding languages (#790) - Throw an error during registration for fonts which Freetype2 does not report a family or style name (r2985). diff --git a/plugins/input/sqlite/sqlite_types.hpp b/plugins/input/sqlite/sqlite_types.hpp index 9e8c25cdb..47de9ba34 100644 --- a/plugins/input/sqlite/sqlite_types.hpp +++ b/plugins/input/sqlite/sqlite_types.hpp @@ -122,7 +122,8 @@ public: sqlite_connection (const std::string& file) : db_(0) { - if (sqlite3_open (file.c_str(), &db_)) + sqlite3_enable_shared_cache(1); + if (sqlite3_open_v2 (file.c_str(), &db_, SQLITE_OPEN_NOMUTEX|SQLITE_OPEN_SHAREDCACHE, 0)) { std::ostringstream s; s << "Sqlite Plugin: ";