mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 01:07:15 +03:00
A Scalable, User-Friendly Source Control System.
562d34cf82
Summary: In previous discussions, it has been pointed out that `folly::RequestContext::setContext` consumes considerable amount of CPU cycles in production environments. After some investigation, we thought that might be caused by looping over all `RequestData` instances can calling the virtual `onSet` and `onUnset` callback of them. Both the iteration and invoking virtual methods are not cheap. As you can see from this change, most of the derived classes of `RequestData` don't override the `onSet` and `onUnset` methods. Mostly likely they are only used for per-Request tracking. So the natural idea is to skip those instances when iterating and avoid the unnecessary virtual method invoke. I have explored the solution to dynamically examine if the `RequestData` instance added has `onSet` and `onUnset` method overridden. That is possible with GCC's PMF extension, but not [[ http://lists.llvm.org/pipermail/llvm-bugs/2015-July/041164.html | for Clang ]] and probably many other compilers. This definitely won't be very good for `folly`'s probability, even if we gate it by compiler flags. Therefore, this Diff adds the `hasCallback` method to `RequestData` class indicating whether the instance would have `onSet` and `onUnset` overridden. To make it clear to users that they need to correctly override it in order for their `onSet` and `onUnset` callback to work, making it abstract so that user must override it to something and would aware of that. Also made some improvements on documentation. Reviewed By: myreg Differential Revision: D6144049 fbshipit-source-id: 4c9fd72e9efaeb6763d55f63760eaf582ee4839e |
||
---|---|---|
common | ||
eden | ||
external | ||
.buckconfig | ||
.gitignore | ||
CONTRIBUTING.md | ||
DEFS | ||
getdeps.py | ||
install | ||
LICENSE | ||
PATENTS | ||
README.md |
Eden
Eden is a project with several components, the most prominent of which is a virtual filesystem built using FUSE.
Caveat Emptor
Eden is still in early stages of development. We are making it available now because we plan to start making references to it from our other open source projects, such as Buck, Watchman, and Nuclide.
The version that we provide on GitHub does not build yet.
This is because the code is exported verbatim from an internal repository at Facebook, and not all of the scaffolding from our internal repository can be easily extracted. The key areas where we need to shore things up are:
- The reinterpretations of build macros in
DEFS
. - A process for including third-party dependencies (presumably via Git submodules) and wiring up the
external_deps
argument in the build macros to point to them. - Providing the toolchain needed to power the [undocumented]
thrift_library()
rule in Buck.
The goal is to get Eden building on both Linux and OS X, though Linux support is expected to come first.