-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
PERF: postpone imports in Index constructor #31423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PERF: postpone imports in Index constructor #31423
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this slowdown persistent with in a session (is import caching not helping)?
|
LGTM
This is surprising and a good catch. I'd be curious whether there's any perf difference between
|
Co-authored-by: Joris Van den Bossche <[email protected]>
xref #30790, it's for improving this one mentioned in that issue:
Only importing the index classes when we actually need them gives a 15-20% speedup.
Last week when profiling the Index constructor, I noticed that those imports actually take quite a bit of time (and it's a change that was introduced after 0.25, #28141). I didn't get any further with profiling (this alone doesn't explain the full slowdown), but thought it's an easy one to already do anyway.