Query calls slow on 0.7beta

Hi everyone,
I was playing around on my project and I noticed that after upgrading from dfx 0.6.26 to 0.7.0-beta.6, I noticed that the query calls where as slow as an update call.
Switching back 0.6.26 in the file dfx.json fixes the problem.

The problem here is that by default we’re proxying all calls via the wallet.
So what you can do on the new beta releases is
dfx canister --no-wallet call and you should see considerably faster queries.

Going to change the semantics of proxying through the wallet canister on dfx canister call soon.

4 Likes

0.6.26 is very far behind the beta at this point, and the 0.7.0 stable should be coming shortly. We recommend the beta builds for any app intended to run on Mercury

1 Like

Version 0.7.0-beta6 5,316s

 » time dfx canister call fast createProfile '("dave", opt null)'
(record { userName = "dave"; createdAt = 1_620_753_497_508_497_000 })
dfx canister call fast createProfile '("dave", opt null)'  0,08s user 0,01s system 1% cpu 5,318 total
» time dfx canister call fast getAllProfiles
(vec { record { userName = "dave"; createdAt = 1_620_753_497_508_497_000 } })
dfx canister call fast getAllProfiles  0,08s user 0,01s system 1% cpu 5,316 total

Version 0.6.26 0,049s

» time dfx canister call fast createProfile '("dave", opt null)' 
Warning: The version of DFX used (0.6.26) is different than the version being run (0.7.0-beta.6).
This might happen because your dfx.json specifies an older version, or DFX_VERSION is set in your environment.
We are forwarding the command line to the old version. To disable this warning, set the DFX_WARNING=-version_check environment variable.

(record { userName = "dave"; createdAt = 1_620_753_756_980_043_000 })
dfx canister call fast createProfile '("dave", opt null)'  0,06s user 0,02s system 3% cpu 2,298 total
------------------------------------------------------------
» time dfx canister call fast getAllProfiles
Warning: The version of DFX used (0.6.26) is different than the version being run (0.7.0-beta.6).
This might happen because your dfx.json specifies an older version, or DFX_VERSION is set in your environment.
We are forwarding the command line to the old version. To disable this warning, set the DFX_WARNING=-version_check environment variable.

(vec { record { userName = "dave"; createdAt = 1_620_753_756_980_043_000 } })
dfx canister call fast getAllProfiles  0,02s user 0,02s system 77% cpu 0,049 total

Did you try with --no-wallet like Prithvi was suggesting?

Thanks for the quick answer the --no-wallet fixed the issue :slight_smile:

3 Likes

Are the calls from js agent also proxied ? @kpeacock

By default, no. You start with an AnonymousAgent as your identity, and can create authenticated Identities using Internet Identity or our @dfinity/identity package primitives

2 Likes

Hi @kpeacock is there any way the dfx team can provide dfx builds that are compiled with the dependency libraries bundled in the binary? Like a standalone version of dfx. This would make it possible to use with Tails for security.