forked from bartvdbraak/blender
Cleanup: remove unused profiling from bpy
This commit is contained in:
parent
603b867588
commit
dbc29cb147
@ -56,22 +56,16 @@ def main():
|
||||
|
||||
# fake module to allow:
|
||||
# from bpy.types import Panel
|
||||
sys.modules["bpy.app"] = app
|
||||
sys.modules["bpy.app.handlers"] = app.handlers
|
||||
sys.modules["bpy.app.translations"] = app.translations
|
||||
sys.modules["bpy.types"] = types
|
||||
sys.modules.update({
|
||||
"bpy.app": app,
|
||||
"bpy.app.handlers": app.handlers,
|
||||
"bpy.app.translations": app.translations,
|
||||
"bpy.types": types,
|
||||
})
|
||||
|
||||
#~ if "-d" in sys.argv: # Enable this to measure start up speed
|
||||
if 0:
|
||||
import cProfile
|
||||
cProfile.run("import bpy; bpy.utils.load_scripts()", "blender.prof")
|
||||
|
||||
import pstats
|
||||
p = pstats.Stats("blender.prof")
|
||||
p.sort_stats("cumulative").print_stats(100)
|
||||
|
||||
else:
|
||||
utils.load_scripts()
|
||||
# Initializes Python classes.
|
||||
# (good place to run a profiler or trace).
|
||||
utils.load_scripts()
|
||||
|
||||
|
||||
main()
|
||||
|
Loading…
Reference in New Issue
Block a user