From 37f6dd7f1027e82fd12c12fca6ff0bae00e4004c Mon Sep 17 00:00:00 2001 From: pommicket Date: Wed, 19 Jul 2023 15:47:53 -0400 Subject: cache buffer_lsp (improves performance a fair bit) --- ted.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ted.h') diff --git a/ted.h b/ted.h index ecd6e89..819001f 100644 --- a/ted.h +++ b/ted.h @@ -414,6 +414,10 @@ typedef struct { /// which LSP this document is open in LSPID lsp_opened_in; + /// determining which LSP to use for a buffer takes some work, + /// so we don't want to do it every single frame. + /// this keeps track of the last time we actually checked what the correct LSP is. + double last_lsp_check; /// where in the undo history was the last write? used by \ref buffer_unsaved_changes u32 undo_history_write_pos; -- cgit v1.2.3