CGCookie / retopoflow

A suite of retopology tools for Blender
2.45k stars 249 forks source link

Starting RetopoFlow the 2nd time results in 500% speed boost on high-res sources #456

Open carter2422 opened 6 years ago

carter2422 commented 6 years ago

When working with high-resolution meshes the initial RetopoFlow session can be very slow, including start-up and active FPS.

If you then leave RF and restart it the active FPS jumps 500%. In my test it went from 5 to 3 FPS.

The startup time differences make sense, but the active FPS should stay the same should they not?

carter2422 commented 6 years ago

@vxlcoder here's the profiler output:

Clearing profiler
DEBUG(0): Profiler:
DEBUG(0):    total      call   ------- seconds / call -------
DEBUG(0):     secs /   count =   last,    min,    avg,    max  (  fps) - call stack
DEBUG(0): ----------------------------------------------------------------------------------------------
DEBUG(0):     2.86 /      17 = 0.0020, 0.0015, 0.1684, 2.8334, (  5.9) - RFContext_Drawing.draw_postview (rfcontext_drawing.py:606)
DEBUG(0):     0.01 /      17 = 0.0006, 0.0004, 0.0005, 0.0007, ( 1k+ ) -  \- render other                   (rfcontext_drawing.py:634)
DEBUG(0):     2.84 /      17 = 0.0004, 0.0001, 0.1669, 2.8321, (  6.0) -  \- render sources                 (rfcontext_drawing.py:623)
DEBUG(0):     2.84 /      17 = 0.0004, 0.0000, 0.1669, 2.8321, (  6.0) -      \- RFMeshRender.draw              (rfmesh_render.py:299)
DEBUG(0):     0.00 /      13 = 0.0001, 0.0001, 0.0002, 0.0004, ( 1k+ ) -          \- RFMeshRender._draw_buffered    (rfmesh_render.py:230)
DEBUG(0):     0.00 /      13 = 0.0001, 0.0001, 0.0001, 0.0004, ( 1k+ ) -              \- geometry above                 (rfmesh_render.py:240)
DEBUG(0):     2.83 /      17 = 0.0000, 0.0000, 0.1666, 2.8313, (  6.0) -          \- RFMeshRender.clean             (rfmesh_render.py:274)
DEBUG(0):     2.40 /       1 = 2.4013, 2.4013, 2.4013, 2.4013, (  0.4) -              \- buffering                      (rfmesh_render.py:157)
DEBUG(0):     0.01 /      17 = 0.0008, 0.0008, 0.0008, 0.0010, ( 1k+ ) -  \- render target                  (rfcontext_drawing.py:630)
DEBUG(0):     0.01 /      17 = 0.0007, 0.0007, 0.0008, 0.0010, ( 1k+ ) -      \- RFMeshRender.draw              (rfmesh_render.py:299)
DEBUG(0):     0.01 /      17 = 0.0006, 0.0005, 0.0006, 0.0007, ( 1k+ ) -          \- RFMeshRender._draw_buffered    (rfmesh_render.py:230)
DEBUG(0):     0.00 /      17 = 0.0003, 0.0003, 0.0003, 0.0003, ( 1k+ ) -              \- geometry above                 (rfmesh_render.py:240)
DEBUG(0):     0.00 /      17 = 0.0002, 0.0002, 0.0003, 0.0003, ( 1k+ ) -              \- geometry below                 (rfmesh_render.py:255)
DEBUG(0):     0.00 /      17 = 0.0000, 0.0000, 0.0000, 0.0000, ( 1k+ ) -          \- RFMeshRender.clean             (rfmesh_render.py:274)
DEBUG(0):     0.00 /      37 = 0.0001, 0.0001, 0.0001, 0.0001, ( 1k+ ) - RFTool_PolyStrips.modal_main   (rftool_polystrips.py:174)
DEBUG(0):     0.00 /      37 = 0.0000, 0.0000, 0.0000, 0.0000, ( 1k+ ) -  \- RFContext_Target.get_vis_accel (rfcontext_target.py:64)
DEBUG(0): 
DEBUG(0): 
RFTools: RFTool_PolyStrips RFTool_Tweak RFTool_Patches RFTool_PolyPen RFTool_Loops RFTool_Relax RFTool_Contours
Clearing profiler
DEBUG(0): Profiler:
DEBUG(0):    total      call   ------- seconds / call -------
DEBUG(0):     secs /   count =   last,    min,    avg,    max  (  fps) - call stack
DEBUG(0): ----------------------------------------------------------------------------------------------
DEBUG(0):     0.29 /     144 = 0.0020, 0.0017, 0.0020, 0.0024, (490.7) - RFContext_Drawing.draw_postview (rfcontext_drawing.py:606)
DEBUG(0):     0.09 /     144 = 0.0006, 0.0004, 0.0006, 0.0008, ( 1k+ ) -  \- render other                   (rfcontext_drawing.py:634)
DEBUG(0):     0.06 /     144 = 0.0004, 0.0004, 0.0004, 0.0006, ( 1k+ ) -  \- render sources                 (rfcontext_drawing.py:623)
DEBUG(0):     0.06 /     144 = 0.0004, 0.0004, 0.0004, 0.0006, ( 1k+ ) -      \- RFMeshRender.draw              (rfmesh_render.py:299)
DEBUG(0):     0.02 /     144 = 0.0001, 0.0001, 0.0002, 0.0002, ( 1k+ ) -          \- RFMeshRender._draw_buffered    (rfmesh_render.py:230)
DEBUG(0):     0.02 /     144 = 0.0001, 0.0001, 0.0001, 0.0002, ( 1k+ ) -              \- geometry above                 (rfmesh_render.py:240)
DEBUG(0):     0.00 /     144 = 0.0000, 0.0000, 0.0000, 0.0000, ( 1k+ ) -          \- RFMeshRender.clean             (rfmesh_render.py:274)
DEBUG(0):     0.11 /     144 = 0.0007, 0.0007, 0.0008, 0.0009, ( 1k+ ) -  \- render target                  (rfcontext_drawing.py:630)
DEBUG(0):     0.11 /     144 = 0.0007, 0.0007, 0.0008, 0.0009, ( 1k+ ) -      \- RFMeshRender.draw              (rfmesh_render.py:299)
DEBUG(0):     0.08 /     144 = 0.0005, 0.0005, 0.0006, 0.0007, ( 1k+ ) -          \- RFMeshRender._draw_buffered    (rfmesh_render.py:230)
DEBUG(0):     0.04 /     144 = 0.0003, 0.0003, 0.0003, 0.0004, ( 1k+ ) -              \- geometry above                 (rfmesh_render.py:240)
DEBUG(0):     0.04 /     144 = 0.0002, 0.0002, 0.0002, 0.0004, ( 1k+ ) -              \- geometry below                 (rfmesh_render.py:255)
DEBUG(0):     0.00 /     144 = 0.0000, 0.0000, 0.0000, 0.0000, ( 1k+ ) -          \- RFMeshRender.clean             (rfmesh_render.py:274)
DEBUG(0):     0.03 /     303 = 0.0001, 0.0001, 0.0001, 0.0002, ( 1k+ ) - RFTool_PolyStrips.modal_main   (rftool_polystrips.py:174)
DEBUG(0):     0.01 /     303 = 0.0000, 0.0000, 0.0000, 0.0001, ( 1k+ ) -  \- RFContext_Target.get_vis_accel (rfcontext_target.py:64)
DEBUG(0): 
DEBUG(0):