chore: disable Elab.async on the cmdline for now (#6722)
Avoids build time overhead until the option is proven to speed up average projects. Adds Init.Prelude (many tiny declarations, "worst case") and Init.List.Sublist (many nontrivial theorems, "best case") under -DElab.async=true as new benchmarks for tracking.
This commit is contained in:
parent
6ebce42142
commit
91e261da38
4 changed files with 16 additions and 3 deletions
|
|
@ -36,7 +36,7 @@ register_builtin_option Elab.async : Bool := {
|
|||
descr := "perform elaboration using multiple threads where possible\
|
||||
\n\
|
||||
\nThis option defaults to `false` but (when not explicitly set) is overridden to `true` in \
|
||||
`Lean.Language.Lean.process` as used by the cmdline driver and language server. \
|
||||
the language server. \
|
||||
Metaprogramming users driving elaboration directly via e.g. \
|
||||
`Lean.Elab.Command.elabCommandTopLevel` can opt into asynchronous elaboration by setting \
|
||||
this option but then are responsible for processing messages and other data not only in the \
|
||||
|
|
|
|||
|
|
@ -433,8 +433,6 @@ where
|
|||
}
|
||||
-- now that imports have been loaded, check options again
|
||||
let opts ← reparseOptions setup.opts
|
||||
-- default to async elaboration; see also `Elab.async` docs
|
||||
let opts := Elab.async.setIfNotSet opts true
|
||||
let cmdState := Elab.Command.mkState headerEnv msgLog opts
|
||||
let cmdState := { cmdState with
|
||||
infoState := {
|
||||
|
|
|
|||
|
|
@ -325,6 +325,9 @@ def setupImports (meta : DocumentMeta) (cmdlineOpts : Options) (chanOut : Std.Ch
|
|||
-- override cmdline options with file options
|
||||
let opts := cmdlineOpts.mergeBy (fun _ _ fileOpt => fileOpt) fileSetupResult.fileOptions
|
||||
|
||||
-- default to async elaboration; see also `Elab.async` docs
|
||||
let opts := Elab.async.setIfNotSet opts true
|
||||
|
||||
return .ok {
|
||||
mainModuleName
|
||||
opts
|
||||
|
|
|
|||
|
|
@ -54,6 +54,18 @@
|
|||
wc -c ${BUILD:-../../build/release}/stage2/lib/lean/libleanshared.so | cut -d' ' -f 1
|
||||
max_runs: 1
|
||||
runner: output
|
||||
- attributes:
|
||||
description: Init.Prelude async
|
||||
tags: [fast]
|
||||
run_config:
|
||||
<<: *time
|
||||
cmd: lean ../../src/Init/Prelude.lean -DElab.async=true
|
||||
- attributes:
|
||||
description: Init.Data.List.Sublist async
|
||||
tags: [fast]
|
||||
run_config:
|
||||
<<: *time
|
||||
cmd: lean ../../src/Init/Data/List/Sublist.lean -DElab.async=true
|
||||
- attributes:
|
||||
description: import Lean
|
||||
tags: [fast]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue