Better way to fix bug#70036
Cache a new eglot--cached-tdi var per buffer, which contains value to
return from eglot--TextDocumentIdentifier.
This avoids frequent expensive recomputation of a value that requires
potentially many 'file-truename' calls. This technique is used in a
number of other cases already, like eglot--recent-changes or
eglot--versioned-identifier.
* lisp/progmodes/eglot.el (eglot--cached-tdi): New variable.
(eglot--TextDocumentIdentifier): Tweak.
(eglot--signal-textDocument/didOpen): Clear eglot--cached-tdi.
(cherry picked from commit
3228c1222c99e672ca0cd7599c07ea1db852aa1a)