skip rna property & function lookups for members starting with "_" (since makesrna disallows this)

added a way profile python startup in bpy/__init__.py, if'd out by default.
This commit is contained in:
2009-11-14 23:11:46 +00:00
parent 33da66d7b3
commit d04f94d0c6
2 changed files with 33 additions and 17 deletions

View File

@@ -64,4 +64,14 @@ def load_scripts(reload_scripts=False):
print("Reloading:", mod)
reload(mod)
load_scripts()
if "-d" in sys.argv and False: # Enable this to measure startup speed
import cProfile
cProfile.run('import bpy; bpy.load_scripts()', 'blender.prof')
import pstats
p = pstats.Stats('blender.prof')
p.sort_stats('cumulative').print_stats(100)
else:
load_scripts()