"Go to Definition" sometimes becomes very slow, but it's not consistently reproducible.
Are there any logs or diagnostic features available to troubleshoot where the problem is occurring?
Usage: Xcode project, using the xcode-build-server tool to generate buildServer.json, opening the project directory with VSCode/Cursor.
You can get a sense if what sourcekit-lsp is doing by running Swift > Capture Diagnostic Bundle and doing Capture Full Diagnostics. Its possible it is still indexing when you do a Go To Definition, or perhaps its blocked on another request.
Swift > Capture Diagnostic Bundle