Zulip Chat Archive
Stream: lean4
Topic: performance regression in nightly-2021-08-04?
David Renshaw (Aug 04 2021 at 15:04):
I'm noticing that some of my code got noticeably slower in nightly-2021-08-04. In particular,
David Renshaw (Aug 04 2021 at 15:04):
David Renshaw (Aug 04 2021 at 15:05):
When I move my cursor through that tactic proof in emacs, it now seems to take about 2 seconds for the goal view to update.
David Renshaw (Aug 04 2021 at 15:05):
Before I updated to nightly-2021-08-04, it was more like a half second.
David Renshaw (Aug 04 2021 at 15:08):
nightly-2021-08-03 does not seem to have this problem, so it seems that something changed in the last day or so to cause this
Daniel Selsam (Aug 04 2021 at 15:12):
can you pls try setting set_option pp.analyze false
?
David Renshaw (Aug 04 2021 at 15:14):
ah, that makes things snappy once again!
Daniel Selsam (Aug 04 2021 at 15:14):
It got merged yesterday, and it hasn't been perf-stress-tested yet. I will investigate.
David Renshaw (Aug 04 2021 at 15:15):
https://github.com/leanprover/lean4/pull/575
David Renshaw (Aug 04 2021 at 15:16):
(^ link to what seems to be the relevant pull request, for context)
Daniel Selsam (Aug 05 2021 at 03:36):
@David Renshaw I issued a PR that speeds your example up a good deal (https://github.com/leanprover/lean4/pull/605). There is still some overhead though with pp.analyze true
, since the analyzer still preprocesses your big terms even though its annotations are ignored by your custom delaborator. There is probably more relatively low hanging fruit to optimize the analyzer further, but note that your example is the epitome of one where you don't want pp.analyze
to run. It is not clear yet whether it is appropriate for pp.analyze
to be the default, but I think your example is "advanced" enough already such that needing to explicitly disable it for best performance would be reasonable.
Last updated: Dec 20 2023 at 11:08 UTC