From dada8eb7decb22b8ac77a08e30a2013679f03343 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Wed, 8 May 2013 11:38:30 -0700 Subject: [PATCH] LevelDB import speedups. --- src/cpp/ripple/Application.cpp | 2 ++ src/cpp/ripple/UpdateTables.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cpp/ripple/Application.cpp b/src/cpp/ripple/Application.cpp index 5bec4cefc0..49581d4665 100644 --- a/src/cpp/ripple/Application.cpp +++ b/src/cpp/ripple/Application.cpp @@ -178,6 +178,8 @@ void Application::setup() options.block_cache = leveldb::NewLRUCache(theConfig.getSize(siHashNodeDBCache) * 1024 * 1024); if (theConfig.NODE_SIZE >= 2) options.filter_policy = leveldb::NewBloomFilterPolicy(10); + if (theConfig.LDB_IMPORT) + options.write_buffer_size = 32 << 20; leveldb::Status status = leveldb::DB::Open(options, (theConfig.DATA_DIR / "hashnode").string(), &mHashNodeLDB); if (!status.ok() || !mHashNodeLDB) { diff --git a/src/cpp/ripple/UpdateTables.cpp b/src/cpp/ripple/UpdateTables.cpp index 1fa0f9726f..557e26b359 100644 --- a/src/cpp/ripple/UpdateTables.cpp +++ b/src/cpp/ripple/UpdateTables.cpp @@ -116,7 +116,7 @@ void Application::updateTables(bool ldbImport) if (theConfig.LDB_IMPORT) { Log(lsWARNING) << "Importing SQLite -> LevelDB"; - theApp->getHashedObjectStore().import(hashPath.string(), true); + theApp->getHashedObjectStore().import(hashPath.string(), false); Log(lsWARNING) << "Remove or remname the hashnode.db file"; } else