mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 16:31:02 +03:00
backingstore: do not initialize memcache for debug builds
Summary: Memcache is dogslow to initialize, taking >30s on debug build. As a consequence, this slows down every single test by that amount time, with the guarantee that no blobs will be found in memcache, ie: a total waste of time. On release builds, Memcache is significantly faster to initialize, so let's only disable initializing Memcache for debug builds only. Reviewed By: fanzeyi Differential Revision: D26800265 fbshipit-source-id: 8b393c603414de68268fdadb385de177e214a328
This commit is contained in:
parent
f22e274e94
commit
d9207cbe4e
@ -38,6 +38,9 @@ impl BackingStore {
|
||||
.local_path(&store_path)
|
||||
.suffix(Path::new("manifests"));
|
||||
|
||||
// Memcache takes 30s to initialize on debug builds slowing down tests significantly, let's
|
||||
// not even try to initialize it then.
|
||||
#[cfg(not(debug_assertions))]
|
||||
match MemcacheStore::new(&config, NullProgressFactory::arc()) {
|
||||
Ok(memcache) => {
|
||||
// XXX: Add the memcachestore for the treestore.
|
||||
|
Loading…
Reference in New Issue
Block a user