Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-07-26 13:09:53 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-07-26 13:09:53 +0400
commit15e94823ddd004b4257d2077e73d629451dc05f8 (patch)
tree4f46c338ec6ebec4d1f7a140d4c665fbae4205ff /release/scripts/ui/space_userpref.py
parented5d0bb62f01cad4f1190dd3830f868067bbc088 (diff)
in debug mode report the time to load addon modules.
Diffstat (limited to 'release/scripts/ui/space_userpref.py')
-rw-r--r--release/scripts/ui/space_userpref.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/release/scripts/ui/space_userpref.py b/release/scripts/ui/space_userpref.py
index b3629b03c22..5bbf3e6d98d 100644
--- a/release/scripts/ui/space_userpref.py
+++ b/release/scripts/ui/space_userpref.py
@@ -829,14 +829,23 @@ class USERPREF_PT_addons(bpy.types.Panel):
@staticmethod
def _addon_list():
import sys
+ import time
+
modules = []
loaded_modules = set()
paths = bpy.utils.script_paths("addons")
+
+ if bpy.app.debug:
+ t_main = time.time()
+
# sys.path.insert(0, None)
for path in paths:
# sys.path[0] = path
modules.extend(bpy.utils.modules_from_path(path, loaded_modules))
+ if bpy.app.debug:
+ print("Addon Script Load Time %.4f" % (time.time() - t_main))
+
# del sys.path[0]
return modules