From f5d06054c07f192903c86d481deb89fa2c9bc1fc Mon Sep 17 00:00:00 2001 From: samkim-crypto Date: Sat, 31 Aug 2024 04:19:21 +0900 Subject: [PATCH] Increase dev mode opt-level for curve25519-dalek crate (#7220) * increase dev mode opt-level for curve25519-dalek crate * add comment to give context on bumping up the opt-level --- Cargo.toml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 6646127b161..c1ac36581f4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,16 @@ [profile.dev] split-debuginfo = "unpacked" +# The curve25519-dalek crate uses the `simd` backend by default in v4 if +# possible, which has very slow performance on some platforms with opt-level 0, +# which is the default for `dev` and `test` builds. This slowdown causes +# certain interactions in the solana-test-validator, such as verifying ZK +# proofs in transactions, to take much more than 400ms, creating problems in +# the test environment. To give better performance in the solana-test-validator +# during tests and dev builds, override the opt-level to 3 for the crate. +[profile.dev.package.curve25519-dalek] +opt-level = 3 + [workspace] members = [ "associated-token-account/client",