perf: faster startup time (#1542)
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 <91e38e63b890fbb214c8914809fde03c73e7f24d@tableflip.io>

ipfs/node-ipfs