#470 raw files should not be build index

This commit is contained in:
groot 2019-11-22 12:05:40 +08:00
parent e96c97c8f7
commit eb0270aee5

View File

@ -32,7 +32,12 @@ const size_t H_SEC = 60 * M_SEC;
const size_t D_SEC = 24 * H_SEC;
const size_t W_SEC = 7 * D_SEC;
const size_t BUILD_INDEX_THRESHOLD = 1000;
// This value is to ignore small raw files when building index.
// The reason is:
// 1. The performance of brute-search for small raw files could be better than small index file.
// 2. And small raw files can be merged to larger files, thus reduce fragmented files count.
// We decide the value based on a testing for small size raw/index files.
const size_t BUILD_INDEX_THRESHOLD = 5000;
} // namespace meta
} // namespace engine