Skip to content

make dev builds -O1

trinity-1686a requested to merge speedup-debug into main

possible fix for #75 (closed)

At first I tried to -O1 only a few crates, but there are actually many that appear to be quite bad in a flamegraph timing just the startup. Non exhaustive list:

  • keccak
  • sha2
  • tor_llcrypto
  • tor_netdoc
  • rangemap
  • base64ct
  • core
  • alloc
  • ...
    and to a lesser point, subtle, hex....

by I don't know which magic, trying to build just these with

[profile.dev.package.<name>]
opt-level = 1

seemed to have a negligible effect, but -O1 the whole build makes loading microdescs go from ~17s to ~3s on my laptop (at the cost of doubling compilation time)

Merge request reports

Loading