Repository navigation
Conversation
joneugster
left a comment
There was a problem hiding this comment.
Thanks! Let me take this as an inspiration to look at the imports more carfully. Meant to do that anyways once your PRs were merged.
There was a problem hiding this comment.
I thought last time I looked at this it was necessary to public import Cli or the command wouldnt run. Forgot what the issue was though
There was a problem hiding this comment.
lake exe graph seems to work for me, I'm not sure! Feel free to revert, though!
|
I used |
|
Hmm, this is a bit difficult because these are (mostly) all just modules for which we load (only) the IR due to So I'm not sure how to lift the necessary constants to the meta level without also loading their IR 🤔 Though, it's probably also worth benching just to confirm that these imports really are what's slowing down mathlib. (That might involve temporarily "breaking" the elaborator code by allowing a relaxed meta check, so that we still produce the code but allow ourselves to break the import chain, then benching.) |
9a091c9 to
7b4c55a
Compare
|
Re: benchmarking, can't we just remove the import of ImportGraph from Mathlib and then benchmark? Or is there anything else that ImportGraph does that could slow down mathlib? |
|
What does |
|
I think it is clear that ImportGraph doesn't need lemmas about iterators. The question is just at what point in the import chain we have a redundant import. Can it be fixed here, or should we make a PR to modify Lake? |
|
It's maybe a merely technical point if this is slowing things down one way or another, but it might be worth clarifying on this PR that So indeed ImportGraph does not have lemmas about iterators, it only has the IR from that module loaded. I do think maybe Sebastian is thinking about this sort of thing based on conversations around |
Well ImportGraph loads its own modules/IR, so if it's loading all the code in ImportGraph proper that's the issue, or some other issue we're not thinking of, we'd miss that. Though I'm not sure how likely this is. |
|
Let's benchmark mathlib without |
This PR runs
lake shake --fix, except forImportGraph.leanandImportGraph.Tools, which are left unchanged.It also updates tests which depend on the import structure of this repo (which is now different).