clarinet icon indicating copy to clipboard operation
clarinet copied to clipboard

Cache deployment on LSP init

Open hugoclrd opened this issue 3 years ago • 2 comments

The generate_default_deployment can take quite a long time and currently runs every time a clarity file is opened or saved.

  • When reading the manifest, compute_addresses is called for every account in Devnet.toml (10 by default) and can takes about 25ms per address. The computed address could be cached
  • get_boot_contracts_asts builds the pox_ast and bns_ast. The parser v2 is ~10x faster than v1, but some precious ms could be saved here as well

When config files are changed (Clarinet.toml or Devnet.toml), the default deployment should be recomputed

hugoclrd avatar Jul 18 '22 10:07 hugoclrd

Is this issue something that we'd like to address for the incoming release @hugocaillard?

lgalabru avatar Oct 03 '22 19:10 lgalabru

It could come in a future release. I'd like to check if the recent slow-downs we had could come from that

hugoclrd avatar Oct 04 '22 09:10 hugoclrd