Zulip Chat Archive

Stream: general

Topic: library indexing speed


Matthew Pocock (Sep 04 2023 at 20:45):

I'm running library_search for the first time and it is indexing the library for the first time. It is very slow. Several seconds per entry. Many, many minutes for the whole process. My laptop fan says my CPU is hot. Is this expected?

Alex J. Best (Sep 04 2023 at 20:46):

What version of lean and mathlib are you using? I ask because the latest lean4 and mathlib now call library_search instead apply? and it should be quite fast and not need to index much anymore

Matthew Pocock (Sep 04 2023 at 20:48):

Alex J. Best said:

What version of lean and mathlib are you using? I ask because the latest lean4 and mathlib now call library_search instead apply? and it should be quite fast and not need to index much anymore

Lean 4 rc4 and matlib4 at 2f410e1ee3eeb7b9953e4e7f66169f0595148263 - not sure exactly what version that corresponds to

Matthew Pocock (Sep 04 2023 at 21:19):

now that it has finally indexed, I don't think I'm importing the tactics correctly

Matthew Pocock (Sep 04 2023 at 22:48):

No, that was user error. The apply? tactic works quite well, some of the time. Thanks.

Scott Morrison (Sep 04 2023 at 23:29):

@Matthew Pocock, did you run lake exe cache get first? You should expect exact? and apply? to be very slow if you haven't done that.

Matthew Pocock (Sep 05 2023 at 00:03):

Scott Morrison said:

Matthew Pocock, did you run lake exe cache get first? You should expect exact? and apply? to be very slow if you haven't done that.

No, I didn't. Now that it's done with melting my laptop, the queries happen very fast.

Scott Morrison (Sep 05 2023 at 01:13):

If you have a suggestion about where in the installation steps we could have more prominently encouraged you to run lake exe cache get, please let us know. :-)

Scott Morrison (Sep 05 2023 at 01:13):

(And we're working on removing the need to run it at all, but are not there yet!)


Last updated: Dec 20 2023 at 11:08 UTC