Skip to content

Commit cf68e23

Browse files
committed
update README.md
1 parent 2e87306 commit cf68e23

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
- [Use multiple sessions](#use-multiple-sessions)
4646
- [Override exchange urls](#override-exchange-urls)
4747
- [Connect to a proxy](#connect-to-a-proxy)
48+
- [Reduce build time](#reduce-build-time)
4849
- [Performance Tuning](#performance-tuning)
4950
- [Known Issues and Workarounds](#known-issues-and-workarounds)
5051

@@ -1081,6 +1082,8 @@ Instantiate `Subscription` with the desired `proxyUrl`.
10811082
Subscription subscription("okx", "BTC-USDT", "MARKET_DEPTH", "", "", {}, "172.30.0.146:9000");
10821083
```
10831084

1085+
#### Reduce build time
1086+
The Pimpl (Pointer to Implementation) idiom in C++ can significantly reduce build time. This reduction is achieved by minimizing compilation dependencies and isolating implementation details. See [this example](example/src/reduce_build_time).
10841087

10851088
## Performance Tuning
10861089
* Turn on compiler optimization flags (e.g. `cmake -DCMAKE_BUILD_TYPE=Release ...`).

example/src/reduce_build_time/my_session.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
namespace ccapi {
99

1010
class EventHandler;
11-
class Session;
11+
class Session; // forward declaration instead of including full header!
1212

1313
class MySession {
1414
public:

0 commit comments

Comments
 (0)