in debug mode report the time to load addon modules.
This commit is contained in:
		@@ -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
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user