From 9f6caadc40a8449f748c458efe9e46e8b4ca31f3 Mon Sep 17 00:00:00 2001 From: Ben Jackson Date: Thu, 9 Jul 2020 18:57:28 +0100 Subject: [PATCH] Pre-calculate the gadgetDir, as this is likely used every time --- python3/vimspector/debug_session.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python3/vimspector/debug_session.py b/python3/vimspector/debug_session.py index 244a0c4..50b2b00 100644 --- a/python3/vimspector/debug_session.py +++ b/python3/vimspector/debug_session.py @@ -181,12 +181,11 @@ class DebugSession( object ): 'dollar': '$', # HACK. Hote '$$' also works. 'workspaceRoot': self._workspace_root, 'workspaceFolder': self._workspace_root, + 'gadgetDir': install.GetGadgetDir( VIMSPECTOR_HOME, install.GetOS() ), 'file': current_file, } calculus = { - 'gadgetDir': lambda: install.GetGadgetDir( VIMSPECTOR_HOME, - install.GetOS() ), 'relativeFile': lambda: relpath( current_file, self._workspace_root ), 'fileBasename': lambda: os.path.basename( current_file ),