Dfx deploy, how to make it faster after first build?

I’m not sure if this works with --emulator, but just in case, you might try:

  • A new --no-artificial-delay option enables you to reduce the time it takes for the local Internet Computer to start.

This change adds the --no-artificial-delay flag to dfx start and dfx replica commands. By default, the local Internet Computer replica that is installed with the DFINITY Canister SDK has an artificial consensus delay to simulate the delay users might see in a networked environment. With this new flag, you can skip the built-in delay when you start the local Internet Computer by running either the dfx start --no-artificial-delay or dfx replica --no-artificial-delay command.

For example, you can start the local Internet Computer without a delay by running the following command:

dfx start -no-artificial-delay

If you use this option, however, you might an increase in the CPU used by the local Internet Computer replica.

2 Likes