'python-shell-get-process' is frequently called from 'python-eldoc--get-doc-at-point' and etc., invoking 'project-current' unless there is a buffer-specific Inferior Python process. When the buffer is a remote buffer not belonging to any project and has significant latency, 'project-current' may take a long time. To avoid this, implement a process cache in 'python-shell-get-process'. * lisp/progmodes/python.el (python-shell--process-cache) (python-shell--process-cache-valid): New variables. (python-shell--invalidate-process-cache): New function. (python-shell-make-comint): Add a call to the above function. (python-shell-get-process): Add process cache. (Bug#80045)
312 KiB
312 KiB