This repository was archived by the owner on Feb 12, 2024. It is now read-only.
Commit 2790e6d
authored
perf: faster startup time (#1542)
I noticed that libp2p takes over 200ms to require. When using the CLI with no daemon we never start the IPFS node so libp2p is required but unused. This PR lazily requires libp2p when start is called, which means that if the node is never started, you do not suffer the 200ms it takes to require the library.
License: MIT
Signed-off-by: Alan Shaw <alan@tableflip.io>1 parent 7c7a5a6 commit 2790e6d
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | 3 | | |
6 | 4 | | |
7 | 5 | | |
| |||
59 | 57 | | |
60 | 58 | | |
61 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| |||
0 commit comments