From 133138a284be1985ebd9ec9014f1306b9a425d98 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Tue, 2 Aug 2016 22:51:21 +0300 Subject: Issue #22557: Now importing already imported modules is up to 2.5 times faster. --- Python/pystate.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Python/pystate.c') diff --git a/Python/pystate.c b/Python/pystate.c index ba4dd4c2b5..b1aececd6f 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -90,6 +90,7 @@ PyInterpreterState_New(void) interp->codecs_initialized = 0; interp->fscodec_initialized = 0; interp->importlib = NULL; + interp->import_func = NULL; #ifdef HAVE_DLOPEN #if HAVE_DECL_RTLD_NOW interp->dlopenflags = RTLD_NOW; @@ -128,6 +129,7 @@ PyInterpreterState_Clear(PyInterpreterState *interp) Py_CLEAR(interp->builtins); Py_CLEAR(interp->builtins_copy); Py_CLEAR(interp->importlib); + Py_CLEAR(interp->import_func); } -- cgit v1.2.1