-
Notifications
You must be signed in to change notification settings - Fork 537
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Externalize templates to speed up build
Profiling the mcrouter OSS build with ninjatracing + clang's -ftime-trace indicates that a significant amount of time is spent in repeated template instantiations for ProxyConfig and ServiceInfo (see attached speedscope profile). Add extern template declarations for these classes with their most common parameter (MemcacheRouterInfo) to reduce compile times. On a full build of mcrouter OSS with all tests, this reduces the build time from ~34 minutes to ~29 minutes.
- Loading branch information
1 parent
60a96f5
commit b28df74
Showing
5 changed files
with
20 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#include "mcrouter/ProxyConfig.h" | ||
#include "mcrouter/ServiceInfo.h" | ||
#include "mcrouter/lib/network/gen/MemcacheRouterInfo.h" | ||
|
||
namespace facebook::memcache::mcrouter { | ||
template class ProxyConfig<facebook::memcache::MemcacheRouterInfo>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters