-
Notifications
You must be signed in to change notification settings - Fork 94
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
Implement Python Import Caching #2905
Conversation
tools/python_api/src_cpp/include/cached_import/py_cached_import.h
Outdated
Show resolved
Hide resolved
tools/python_api/src_cpp/include/cached_import/py_cached_import.h
Outdated
Show resolved
Hide resolved
tools/python_api/src_cpp/include/cached_import/py_cached_import.h
Outdated
Show resolved
Hide resolved
tools/python_api/src_cpp/include/cached_import/py_cached_modules.h
Outdated
Show resolved
Hide resolved
tools/python_api/src_cpp/include/cached_import/py_cached_modules.h
Outdated
Show resolved
Hide resolved
tools/python_api/src_cpp/include/cached_import/py_cached_import.h
Outdated
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2905 +/- ##
=======================================
Coverage 93.48% 93.49%
=======================================
Files 1116 1121 +5
Lines 42717 42759 +42
=======================================
+ Hits 39936 39978 +42
Misses 2781 2781 ☔ View full report in Codecov by Sentry. |
b7c3cb4
to
00e7668
Compare
27f97a5
to
c20ce98
Compare
c20ce98
to
2a8e9dc
Compare
tools/python_api/src_cpp/include/cached_import/py_cached_import.h
Outdated
Show resolved
Hide resolved
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.
Not a comprehensive list, but these are some copies I think, and they need to hold the GIL,.
becomes
Now that modules are shared, it's required to acquire the Global Interpreter Lock before accessing modules.
Technically, it's possible to skip acquiring this lock if we know the module is already cached, but that isn't implemented here.