The meta-driver is growing sluggish now that I have most definitions for the driver visible on the surface. Let's see if this helps.
TQS2PIWKR64MHXPQOC5PYOB3TZAUWAZUSJH55NQOW722LZ76M3LQC on.text_input = function(t)print('text input', t)if Manifest_navigator.show thentext_input_on_manifest_navigator(t)elseif Cursor_node thenlocal old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}local old_definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)edit.text_input(Cursor_node.editor, t)if not eq(Cursor_node.editor.screen_top1, old_top) thenViewport.y = Cursor_node.y + y_of_schema1(Cursor_node.editor, Cursor_node.editor.screen_top1)endlocal definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)maybe_update_key_in_definitions(old_definition_name, definition_name, Cursor_node)-- we need to call A sometimes, but redoing compute_layout on every single character is too muchB(--[[preserve screen_top of cursor node]] true)endend
{"fw_parent":831,"surface_bounds":814,"font":353,"table_and_array_both_empty":689,"move_candidate_to_front_of_manifest":632,"Definitions":503,"text_input_on_manifest_navigator":634,"from_viewport":823,"manifest_coord":636,"interpolate_viewport":824,"manifest_index":637,"manifest_navigator_candidates":638,"Cursor_node":172,"copy_shape":396,"add_def_to_menu":640,"B":830,"maybe_update_key_in_definitions":529,"on.mouse_release":721,"on.key_release":720,"Animating":813,"mouse_cursor":558,"y_of_schema1":364,"Mouse_cursor":559,"on.text_input":832,"line_height":365,"draw_cursor":639,"set_mouse_cursor":562,"on.code_change":820,"draw_ticks":663,"on_text":539,"on.mouse_press":722,"scale":712,"order_of_magnitude":573,"sx":544,"vx":545,"approximate":579,"on":1,"approximate_up":658,"Ticks_font":669,"initialize_editor":678,"Manifest_navigator":495,"tick_spec":660,"Page":475,"on.keychord_press":828,"keychord_press_on_manifest_navigator":765,"schema1_of_y":667,"on.update":802,"wait_for_response":781,"on.code_submit":787,"on.initialize":807,"vy":546,"manifest_navigator_down":635,"load_manifest":694,"on_handle":547,"animate_next_frame":825,"Manifest":769,"initialize_manifest_navigator":773,"load_definition":716,"delete_definition":673,"sy":469,"update_editor_box":711,"Menu_background_color":611,"get_multiple_definitions_from_app":783,"Surface":422,"get_manifest":768,"Menu_command_color":613,"on.draw":797,"Menu_highlight_color":614,"draw_run_time_error":808,"draw_menu_bar":641,"Viewport":604,"add_hotkey_to_menu":616,"A":831,"survey_animation":827,"draw_manifest_navigator":677,"animate_next":809,"num_lines_for_manifest_navigator":676,"Menu_border_color":612,"compute_layout":385,"reset_manifest_navigator":772,"fw_app":"driver","box_height":680,"load_from_iterator":670,"new_definition":821,"get_definition_from_app":784,"Spawn_point":822,"on.save_settings":742,"add_thick_line":400,"on.load_settings":782,"manifest_navigator_up":628}
{"schema1_of_y":667,"draw_ticks":663,"Cursor_node":172,"y_of_schema1":364,"on.text_input":829,"order_of_magnitude":573,"load_definition":716,"approximate":579,"on.save_settings":742,"box_height":680,"on.load_settings":782,"approximate_up":658,"table_and_array_both_empty":689,"on.code_change":820,"scale":712,"Ticks_font":669,"initialize_manifest_navigator":773,"get_multiple_definitions_from_app":783,"add_thick_line":400,"copy_shape":396,"Manifest":769,"load_manifest":694,"initialize_editor":678,"Menu_background_color":611,"Menu_border_color":612,"Menu_command_color":613,"Definitions":503,"Menu_highlight_color":614,"font":353,"draw_menu_bar":641,"animate_next":809,"add_hotkey_to_menu":616,"draw_manifest_navigator":677,"animate_next_frame":825,"A":831,"reset_manifest_navigator":772,"survey_animation":827,"B":830,"maybe_update_key_in_definitions":529,"get_definition_from_app":784,"add_def_to_menu":640,"surface_bounds":814,"on.keychord_press":828,"compute_layout":385,"manifest_navigator_up":628,"fw_app":"driver","manifest_navigator_down":635,"wait_for_response":781,"new_definition":821,"delete_definition":673,"Spawn_point":822,"move_candidate_to_front_of_manifest":632,"from_viewport":823,"keychord_press_on_manifest_navigator":765,"interpolate_viewport":824,"text_input_on_manifest_navigator":634,"on_handle":547,"get_manifest":768,"manifest_coord":636,"Viewport":604,"Surface":422,"draw_cursor":639,"manifest_navigator_candidates":638,"on.draw":797,"manifest_index":637,"vx":545,"on":1,"sx":544,"load_from_iterator":670,"set_mouse_cursor":562,"vy":546,"on.code_submit":787,"on.initialize":807,"draw_run_time_error":808,"on.key_release":720,"on.mouse_press":722,"Mouse_cursor":559,"on.mouse_release":721,"line_height":365,"on.update":802,"sy":469,"update_editor_box":711,"Animating":813,"mouse_cursor":558,"num_lines_for_manifest_navigator":676,"Page":475,"tick_spec":660,"fw_parent":830,"on_text":539,"Manifest_navigator":495}
A = function(preserve_screen_top_of_cursor_node)print('A')love.graphics.setFont(love.graphics.newFont(scale(20))) -- editor objects implicitly depend on current font-- translate Definitions to SurfaceSurface = {}for _,node in pairs(Definitions) docompute_layout(node, node.x,node.y, Surface, preserve_screen_top_of_cursor_node)end-- continue the pipelineB(preserve_screen_top_of_cursor_node)-- TODO: ugly that we're manipulating editor objects twiceend
{"schema1_of_y":667,"draw_ticks":663,"Cursor_node":172,"y_of_schema1":364,"on.text_input":829,"order_of_magnitude":573,"load_definition":716,"approximate":579,"on.save_settings":742,"box_height":680,"on.load_settings":782,"approximate_up":658,"table_and_array_both_empty":689,"on.code_change":820,"scale":712,"Ticks_font":669,"initialize_manifest_navigator":773,"get_multiple_definitions_from_app":783,"add_thick_line":400,"copy_shape":396,"Manifest":769,"load_manifest":694,"initialize_editor":678,"Menu_background_color":611,"Menu_border_color":612,"Menu_command_color":613,"Definitions":503,"Menu_highlight_color":614,"font":353,"draw_menu_bar":641,"animate_next":809,"add_hotkey_to_menu":616,"draw_manifest_navigator":677,"animate_next_frame":825,"A":713,"reset_manifest_navigator":772,"survey_animation":827,"B":830,"maybe_update_key_in_definitions":529,"get_definition_from_app":784,"add_def_to_menu":640,"surface_bounds":814,"on.keychord_press":828,"compute_layout":385,"manifest_navigator_up":628,"fw_app":"driver","manifest_navigator_down":635,"wait_for_response":781,"new_definition":821,"delete_definition":673,"Spawn_point":822,"move_candidate_to_front_of_manifest":632,"from_viewport":823,"keychord_press_on_manifest_navigator":765,"interpolate_viewport":824,"text_input_on_manifest_navigator":634,"on_handle":547,"get_manifest":768,"manifest_coord":636,"Viewport":604,"Surface":422,"draw_cursor":639,"manifest_navigator_candidates":638,"on.draw":797,"manifest_index":637,"vx":545,"on":1,"sx":544,"load_from_iterator":670,"set_mouse_cursor":562,"vy":546,"on.code_submit":787,"on.initialize":807,"draw_run_time_error":808,"on.key_release":720,"on.mouse_press":722,"Mouse_cursor":559,"on.mouse_release":721,"line_height":365,"on.update":802,"sy":469,"update_editor_box":711,"Animating":813,"mouse_cursor":558,"num_lines_for_manifest_navigator":676,"Page":475,"tick_spec":660,"fw_parent":829,"on_text":539,"Manifest_navigator":495}
B = function(preserve_screen_top_of_cursor_node)print('B')-- recompute various aspects based on the current viewport settingslove.graphics.setFont(love.graphics.newFont(scale(20))) -- editor objects implicitly depend on current font so update itfor _,obj in ipairs(Surface) doif obj.type == 'line' thenobj.zdata = {}for i=1,#obj.data,2 dotable.insert(obj.zdata, vx(obj.data[i]))table.insert(obj.zdata, vy(obj.data[i+1]))endelseif obj.type == 'bezier' thenzdata = {}for i=1,#obj.data,2 dotable.insert(zdata, vx(obj.data[i]))table.insert(zdata, vy(obj.data[i+1]))endobj.zdata = love.math.newBezierCurve(zdata):render()elseif obj.type == 'text' thenif obj.w thenupdate_editor_box(obj, preserve_screen_top_of_cursor_node)elseobj.text = love.graphics.newText(love.graphics.getFont(), obj.data)endendendend
on.text_input = function(t)print('text input', t)if Manifest_navigator.show thentext_input_on_manifest_navigator(t)elseif Cursor_node thenlocal old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}local old_definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)edit.text_input(Cursor_node.editor, t)if not eq(Cursor_node.editor.screen_top1, old_top) thenViewport.y = Cursor_node.y + y_of_schema1(Cursor_node.editor, Cursor_node.editor.screen_top1)endlocal definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)maybe_update_key_in_definitions(old_definition_name, definition_name, Cursor_node)A(--[[preserve screen_top of cursor node]] true)endend
{"schema1_of_y":667,"draw_ticks":663,"Cursor_node":172,"y_of_schema1":364,"on.text_input":829,"order_of_magnitude":573,"load_definition":716,"approximate":579,"on.save_settings":742,"box_height":680,"on.load_settings":782,"approximate_up":658,"table_and_array_both_empty":689,"on.code_change":820,"scale":712,"Ticks_font":669,"initialize_manifest_navigator":773,"get_multiple_definitions_from_app":783,"add_thick_line":400,"copy_shape":396,"Manifest":769,"load_manifest":694,"initialize_editor":678,"Menu_background_color":611,"Menu_border_color":612,"Menu_command_color":613,"Definitions":503,"Menu_highlight_color":614,"font":353,"draw_menu_bar":641,"animate_next":809,"add_hotkey_to_menu":616,"draw_manifest_navigator":677,"animate_next_frame":825,"A":713,"reset_manifest_navigator":772,"survey_animation":827,"B":379,"maybe_update_key_in_definitions":529,"get_definition_from_app":784,"add_def_to_menu":640,"surface_bounds":814,"on.keychord_press":828,"compute_layout":385,"manifest_navigator_up":628,"fw_app":"driver","manifest_navigator_down":635,"wait_for_response":781,"new_definition":821,"delete_definition":673,"Spawn_point":822,"move_candidate_to_front_of_manifest":632,"from_viewport":823,"keychord_press_on_manifest_navigator":765,"interpolate_viewport":824,"text_input_on_manifest_navigator":634,"on_handle":547,"get_manifest":768,"manifest_coord":636,"Viewport":604,"Surface":422,"draw_cursor":639,"manifest_navigator_candidates":638,"on.draw":797,"manifest_index":637,"vx":545,"on":1,"sx":544,"load_from_iterator":670,"set_mouse_cursor":562,"vy":546,"on.code_submit":787,"on.initialize":807,"draw_run_time_error":808,"on.key_release":720,"on.mouse_press":722,"Mouse_cursor":559,"on.mouse_release":721,"line_height":365,"on.update":802,"sy":469,"update_editor_box":711,"Animating":813,"mouse_cursor":558,"num_lines_for_manifest_navigator":676,"Page":475,"tick_spec":660,"fw_parent":828,"on_text":539,"Manifest_navigator":495}
on.keychord_press = function(chord, key)print('key', chord)if Animating then return endif Move then return endif Manifest_navigator.reload thenload_manifest()endif chord == 'C-=' then-- zoom inViewport.zoom = Viewport.zoom+0.1B()elseif chord == 'C--' then-- zoom outif (Viewport.zoom-0.1)*20 >= 1 then -- disallow font size of 0Viewport.zoom = Viewport.zoom-0.1B()endelseif chord == 'C-0' then-- reset zoomViewport.zoom = 1.0B()elseif chord == 'C-q' thenlive.send_to_app('QUIT')elseif Manifest_navigator.show thenkeychord_press_on_manifest_navigator(chord, key)elseif chord == 'C-n' thennew_definition()A()elseif chord == 'C-l' thenManifest_navigator.show = trueManifest_navigator.for_delete = falseinitialize_manifest_navigator()elseif chord == 'C-d' thenManifest_navigator.show = trueManifest_navigator.for_delete = trueinitialize_manifest_navigator()elseif Cursor_node thenlocal old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}local old_definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)edit.keychord_press(Cursor_node.editor, chord, key)if not eq(Cursor_node.editor.screen_top1, old_top) thenViewport.y = Cursor_node.y + y_of_schema1(Cursor_node.editor, Cursor_node.editor.screen_top1)endlocal definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)maybe_update_key_in_definitions(old_definition_name, definition_name, Cursor_node)B(--[[preserve screen_top of cursor node]] true)elseif chord == 'up' thenViewport.y = Viewport.y - scale(20)B()elseif chord == 'down' thenViewport.y = Viewport.y + scale(20)B()elseif chord == 'left' thenViewport.x = Viewport.x - scale(50)B()elseif chord == 'right' thenViewport.x = Viewport.x + scale(50)B()elseif chord == 'pageup' thenViewport.y = Viewport.y - App.screen.height/Viewport.zoomB()elseif chord == 'S-up' thenViewport.y = Viewport.y - App.screen.height/Viewport.zoomB()elseif chord == 'pagedown' thenViewport.y = Viewport.y + App.screen.height/Viewport.zoomB()elseif chord == 'S-down' thenViewport.y = Viewport.y + App.screen.height/Viewport.zoomB()elseif chord == 'S-left' thenViewport.x = Viewport.x - App.screen.width/Viewport.zoomB()elseif chord == 'S-right' thenViewport.x = Viewport.x + App.screen.width/Viewport.zoomB()endendend
{"schema1_of_y":667,"draw_ticks":663,"Cursor_node":172,"y_of_schema1":364,"on.text_input":521,"order_of_magnitude":573,"load_definition":716,"approximate":579,"on.save_settings":742,"box_height":680,"on.load_settings":782,"approximate_up":658,"table_and_array_both_empty":689,"on.code_change":820,"scale":712,"Ticks_font":669,"initialize_manifest_navigator":773,"get_multiple_definitions_from_app":783,"add_thick_line":400,"copy_shape":396,"Manifest":769,"load_manifest":694,"initialize_editor":678,"Menu_background_color":611,"Menu_border_color":612,"Menu_command_color":613,"Definitions":503,"Menu_highlight_color":614,"font":353,"draw_menu_bar":641,"animate_next":809,"add_hotkey_to_menu":616,"draw_manifest_navigator":677,"animate_next_frame":825,"A":713,"reset_manifest_navigator":772,"survey_animation":827,"B":379,"maybe_update_key_in_definitions":529,"get_definition_from_app":784,"add_def_to_menu":640,"surface_bounds":814,"on.keychord_press":828,"compute_layout":385,"manifest_navigator_up":628,"fw_app":"driver","manifest_navigator_down":635,"wait_for_response":781,"new_definition":821,"delete_definition":673,"Spawn_point":822,"move_candidate_to_front_of_manifest":632,"from_viewport":823,"keychord_press_on_manifest_navigator":765,"interpolate_viewport":824,"text_input_on_manifest_navigator":634,"on_handle":547,"get_manifest":768,"manifest_coord":636,"Viewport":604,"Surface":422,"draw_cursor":639,"manifest_navigator_candidates":638,"on.draw":797,"manifest_index":637,"vx":545,"on":1,"sx":544,"load_from_iterator":670,"set_mouse_cursor":562,"vy":546,"on.code_submit":787,"on.initialize":807,"draw_run_time_error":808,"on.key_release":720,"on.mouse_press":722,"Mouse_cursor":559,"on.mouse_release":721,"line_height":365,"on.update":802,"sy":469,"update_editor_box":711,"Animating":813,"mouse_cursor":558,"num_lines_for_manifest_navigator":676,"Page":475,"tick_spec":660,"fw_parent":827,"on_text":539,"Manifest_navigator":495}