sapling/eden/fs
Xavier Deguillard b73674c009 inodes: speed up globbing by not copying vectors
Summary:
C++ is full of footguns, in this case, the lockContents method either returns a
const std::vector<TreeEntry>&, or an rlock RAII for a folly::Synchronized
object. When assigning the return value of that method to an `auto` variable, a
copy is made in both cases, which isn't exactly what is desired in the first
case. Instead using the reference as-is is what we want.

To achieve the right behavior, a `const auto&` needs to be used: it will either be
a const reference in the first case, or a copy in the second case.

During an `arc focus2` while the Buck parsing phase is ongoing, the copy shows
up at the top of the profiler as one of the most expensive operation. This
significantly reduce its cost.

Reviewed By: chadaustin

Differential Revision: D28591502

fbshipit-source-id: eac1e062ed94442c90ac549ec137d91b4cb42b9c
2021-05-21 19:26:46 -07:00
..
benchharness add 4k random writes benchmark 2020-07-14 16:13:37 -07:00
benchmarks benchmarks: add a globbing benchmark 2021-05-21 19:26:46 -07:00
cli add a v2 SNAPSHOT format 2021-05-21 10:53:16 -07:00
cli_rs Resolve bare_trait_objects warnings in path components 2021-05-19 22:03:56 -07:00
config add a v2 SNAPSHOT format 2021-05-21 10:53:16 -07:00
docs run linter in eden/fs/docs 2021-01-25 16:13:54 -08:00
fuse fuse: use ImmediateFuture in the Fuse dispatcher 2021-05-17 14:07:29 -07:00
inodes inodes: speed up globbing by not copying vectors 2021-05-21 19:26:46 -07:00
journal use portable version of gtest 2021-05-12 15:58:27 -07:00
model stop tracking parent2 2021-05-21 10:53:16 -07:00
monitor Apply clang-format update fixes 2021-01-10 10:06:29 -08:00
nfs nfs: switch RpcServerProcessor::dispatchRpc to ImmediateFuture 2021-05-13 16:51:34 -07:00
notifications notifications: support Windows 2020-11-11 09:37:56 -08:00
prjfs telemetry: switch to using quantile stats instead of histograms 2021-02-14 16:37:08 -08:00
py Backout py3 only changes from windows_thrift 2021-04-22 10:29:49 -07:00
rocksdb Remove dead includes in eden 2019-10-11 16:45:01 -07:00
scripts move eden/scripts/ into eden/fs/ 2020-11-04 18:29:49 -08:00
service stop tracking parent2 2021-05-21 10:53:16 -07:00
sqlite overlay: use PersistentSqliteStatement in TreeOverlayStore 2021-03-15 12:01:48 -07:00
store use portable version of gtest 2021-05-12 15:58:27 -07:00
takeover use portable version of gtest 2021-05-12 15:58:27 -07:00
telemetry use portable version of gtest 2021-05-12 15:58:27 -07:00
testharness remove support for legacy SNAPSHOT files 2021-05-21 10:53:16 -07:00
third-party fs: update fuse_kernel_linux.h 2021-03-17 20:55:43 -07:00
utils utils: handle void lambda in ImmediateFuture 2021-05-17 14:07:29 -07:00
CMakeLists.txt nfs: make it compile with getdeps builds 2021-02-03 17:54:54 -08:00