Skip to content

does importing a module more then once affects runtime? #3566

Discussion options

You must be logged in to vote

Maybe I misunderstood your question: Are you asking about the effect of importing some module foo from your Rust code? Or are you asking about repeatedly importing your Rust-written extension foo?

If you are talking about repeatedly import a Rust extension than we prevented this until recently where we relaxed the check to prevent only usage in multiple sub-interpreters but made multiple imports a no-op, c.f. #3446

Hence, it will also not have any effect performance effect besides the cost of running the import itself.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@raisfeld-ori
Comment options

@adamreichold
Comment options

Answer selected by raisfeld-ori
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants