in debug mode report the time to load addon modules.
authorCampbell Barton <ideasman42@gmail.com>
Mon, 26 Jul 2010 09:09:53 +0000 (09:09 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 26 Jul 2010 09:09:53 +0000 (09:09 +0000)
release/scripts/modules/bpy/utils.py
release/scripts/ui/space_userpref.py

index 404013fb79a1ae69180c48d01a635802e9a4ac22..be52986bbad07fe20b87151d89b359600c40b76b 100644 (file)
@@ -210,7 +210,7 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
         print("gc.collect() -> %d" % gc.collect())
 
     if _bpy.app.debug:
-        print("Time %.4f" % (time.time() - t_main))
+        print("Python Script Load Time %.4f" % (time.time() - t_main))
 
 
 def expandpath(path):
index b3629b03c2278180e9f7171f8fdabef5b5721cb0..5bbf3e6d98db3ee04673198e6a88fdba9a67367e 100644 (file)
@@ -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